I recall hearing things like a 15% slowdown for using threads and
nothing close to 50% as well. Here is the simple wc.pl script used
and timings for 5.6.1(no-threads) and 5.8.0(threaded).
############
# here's a real wc on the data.txt file
$ wc data.txt
208048 1675832 11021496 data.txt
############
# here's the test wc.pl script
$ cat wc.pl
#!/usr/bin/perl -w
use strict;
my $total = @ARGV > 1;
my($lines, $words, $bytes);
while(<>){
my @words = split;
$words += @words;
$bytes += length;
$lines++;
}
printf "%7d %7d %7d %s\n",$lines,$words,$bytes,$ARGV;
############
# here's results for 5.6.1 no-threads in /usr/bin/perl
$ /usr/bin/perl -v
This is perl, v5.6.1 built for i686-linux
$ time /usr/bin/perl wc.pl data.txt
208048 1675832 11021496 data.txt
real 0m7.220s
user 0m7.030s
sys 0m0.080s
############
# here's results for 5.8.0 threaded in /usr/local/bin/perl
$ /usr/local/bin/perl -v
This is perl, v5.8.0 built for i686-linux-thread-multi
$ time /usr/local/bin/perl wc.pl data.txt
208048 1675832 11021496 data.txt
real 0m15.591s
user 0m15.350s
sys 0m0.130s
For 5.8.0 non-threaded but with 64-bit integer support the above ran
at 9.2 seconds (circa 20% slower).