in reply to Re: relative speed of 5.8.0
in thread relative speed of 5.8.0
############ # 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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: relative speed of 5.8.0
by Elian (Parson) on Jul 22, 2002 at 20:27 UTC | |
|
Re: Re: Re: relative speed of 5.8.0
by Hrunting (Pilgrim) on Jul 23, 2002 at 12:45 UTC | |
by Anonymous Monk on Jul 23, 2002 at 15:33 UTC |