in reply to Why is Windows 100 times slower than Linux when growing a large scalar?

More anecdotal data, with a one-liner test:


Activestate Perl 5.10.0 on XP+SP2:

>perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread [snip] Binary build 1004 [287188] provided by ActiveState http://www.ActiveSt +ate.com Built Sep 3 2008 13:16:37 [snip] >perl -MBenchmark -lwe "my$x=q//; print timestr(timeit(eval($ARGV[0]), +sub{$x .= (q/x/ x 1000);}));" 10_000 64 wallclock secs (37.05 usr + 25.88 sys = 62.92 CPU) @ 158.93/s (n=10 +000)
(100,000 was obviously taking forever, so I skipped it.)


Cygwin Perl 5.10.0 on the same system:

# perl -v This is perl, v5.10.0 built for cygwin-thread-multi-64int [snip] # perl -MBenchmark -lwe 'my$x=q//; print timestr(timeit(eval($ARGV[0]) +,sub{$x .= (q/x/ x 1000);}));' 10_000 1 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU) @ 158730.16/s (n +=10000) # perl -MBenchmark -lwe 'my$x=q//; print timestr(timeit(eval($ARGV[0] +),sub{$x .= (q/x/ x 1000);}));' 100_000 1 wallclock secs ( 0.61 usr + 0.03 sys = 0.64 CPU) @ 156006.24/s (n +=100000)

Replies are listed 'Best First'.
Re^2: Why is Windows 100 times slower than Linux when growing a large scalar?
by Anonymous Monk on Dec 01, 2009 at 10:53 UTC
    Also XP, MinGW built
    This is perl, v5.10.1 (perl-5.10.1*) built for MSWin32-x86-multi-threa +d
    $ perl -MBenchmark -lwe "my$x=q//; print timestr(timeit(eval($ARGV[0]) +,sub{$x .= (q/x/ x 1000);}));" 10_000 32 wallclock secs (20.41 usr + 9.34 sys = 29.75 CPU) @ 336.13/s (n=10 +000)
    ActivePerl
    >perl -v This is perl, v5.8.9 built for MSWin32-x86-multi-thread (with 9 regist +ered patches, see perl -V for more detail) >perl -MBenchmark -lwe "my$x=q//; print timestr(timeit(eval($ARGV[0]), +sub{$x .= (q/x/ x 100);}));" 10_000 33 wallclock secs (20.53 usr + 9.47 sys = 30.00 CPU) @ 333.32/s (n=10 +000)