Vaclav Mocek
2008-Aug-29 19:34 UTC
[CentOS] Slow perl on CentOS - ActivePerl as a solution
Hi all,
I found out that one of my perl scripts is heavily affected by the
current bug. I was lazy to compile anything and I didn't want to mess
up my system doing some experiments, so I tried to install ActivePerl as
a temporary solution instead (RPMs are available). ActivePerl 5.8 is
approximately 73x faster that CentOS version and ActivePerl 5.10 even
slightly faster. Both versions and all installed packages (GUI ppm)
work flawlessly and at least for me it is the way how to survive until
CentOS 5.3 will be released.
[vamo at argon ~]$ cat test.pl
#!/usr/bin/perl
use overload q(<) => sub {};
my %h;
for (my $i=0; $i<50000; $i++) {
$h{$i} = bless [ ] => 'main';
print STDERR '.' if $i % 1000 == 0;
}
print "\n";
[vamo at argon ~]$ /opt/ActivePerl-5.8/bin/perl -d:DProf test.pl
..................................................
[vamo at argon ~]$ dprofpp tmon.out
Total Elapsed Time = 0.199955 Seconds
User+System Time = 0.189955 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
5.26 0.010 0.010 2 0.0050 0.0050 main::BEGIN
0.00 - -0.000 1 - - overload::OVERLOAD
0.00 - -0.000 1 - - warnings::BEGIN
0.00 - -0.000 2 - - warnings::register::mkMask
0.00 - -0.000 1 - - overload::import
0.00 - -0.000 1 - - overload::BEGIN
0.00 - -0.000 1 - - warnings::register::import
[vamo at argon ~]$ /usr/bin/perl -d:DProf test.pl
..................................................
[vamo at argon ~]$ dprofpp tmon.out
Total Elapsed Time = 12.48996 Seconds
User+System Time = 12.47996 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
0.08 0.010 0.010 1 0.0100 0.0100 main::BEGIN
0.00 - -0.000 1 - - warnings::BEGIN
0.00 - -0.000 1 - - overload::OVERLOAD
0.00 - -0.000 2 - - warnings::register::mkMask
0.00 - -0.000 1 - - overload::import
0.00 - -0.000 1 - - overload::BEGIN
0.00 - -0.000 1 - - warnings::register::import
Vaclav
