in reply to Re^2: 5:10: Why is this slower than 5.8.8?
in thread 5:10: Why is this slower than 5.8.8?
Well, then try the following script
On my system running this script with a perlmalloc-built perl is 600x (!) faster than with a sysmalloc-built perl:my $max = 50000; my @l = ('a'..'z'); my @keys = map { join '', map $l[rand @l], 0..71 } 0..$max;
This is a pathological case, but this may happen with FreeBSD's malloc.$ time /usr/local/src/perl-5.10.0-perlmalloc/perl -I/usr/local/src/per +l-5.10.0-perlmalloc/lib ~/trash/slow_malloc2.pl 3.027u 0.435s 0:03.68 93.7% 1448+324155k 0+0io 0pf+0w $ time /usr/local/src/perl-5.10.0-sysmalloc/perl -I/usr/local/src/perl +-5.10.0-sysmalloc/lib ~/trash/slow_malloc2.pl 405.090u 189.574s 13:01.52 76.0% 1466+495449k 0+0io 0pf+0w
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: 5:10: Why is this slower than 5.8.8?
by Anonymous Monk on Dec 24, 2007 at 08:36 UTC | |
by eserte (Deacon) on Dec 24, 2007 at 09:43 UTC |
In Section
Seekers of Perl Wisdom