Hi,
as follow-up: The massive amounts of context switches is probably caused
by the global lock on @sortdata, which is shared among the threads and
changed a lot. Perl doesn't seem to provide a fine-granular locking
mechanism for arrays.
See also:
http://www.nntp.perl.org/group/perl.ithreads/2008/09/msg1323.html
Decide for yourself if this is considered a bug or just an intended but
not-well scaling behaviour ... :)
Thanks,
Thomas