Is perl 5.8 slower than 5.005_03?

J

Jon Reed

Is perl 5.8 slower than perl 5.005_03 ?


We rebuilt one of three webserver machines with solaris 5.8 and added
perl 5.8 using
./Configure -des -Dusethreads -Dcc='gcc -B/usr/ccs/bin/'

(The old configuration was Solaris 5.6 with perl 5.005_03)

I noticed that our website seemed slower with this new configuration.
Using Apache Benchmark confirmed that it was slower. Next step was to
eliminate the webserver, so executing a simple perl script 1000 times
direct from the command line took about 30 seconds with perl 5.8.
Then I copied the perl 5.005_03 binary over from a very similar
machine (that has not been rebuilt yet) and it takes 16 seconds for
the same test!!

This is consistent with the behavior I am seeing where anything using
perl on the new machine is slower.

Then I installed perl 5.8 as a package from sunfreeware and the same
test takes about 30 seconds. Consistent with my other install of 5.8.

Also,
The 5.005_03 is --> version 5.005_03 built for sun4-solaris
The 5.8 package is --> v5.8.0 built for sun4-solaris
The 5.8 that I compiled is --> v5.8.0 built for
sun4-solaris-thread-multi

Given that both 5.8 installs were significantly longer in my tests, I
don't think the multi-thread makes a difference at this point.

Is perl 5.8 slower than 5.005_03? Does anyone have any tips for
enhancing the performance of perl? Is there a switch or something in
the config I was supposed to set?

Any other ideas why I am seeing such a degradation in performance of
perl with this new version?

Thanks in advance.

Jon Reed
 
B

Ben Morrow

We rebuilt one of three webserver machines with solaris 5.8 and added
perl 5.8 using
./Configure -des -Dusethreads -Dcc='gcc -B/usr/ccs/bin/'

Was the perl you got from sunfreeware also built with gcc? What about
the old perl? Does it make a difference if you use Sun's compiler? You
may also want to check the compiler optimizations used: perl -V tells
you what was used in each case.

What happens if you try 5.6 instead (on the vague hypothesis that the
new Unicode stuff might be making a difference)? 5.6 is *enormously*
improved on 5.005_03, so it's well worth upgrading at least that far.

Ben
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
Jon Reed
Is perl 5.8 slower than perl 5.005_03 ?
eliminate the webserver, so executing a simple perl script 1000 times
direct from the command line took about 30 seconds with perl 5.8.
Then I copied the perl 5.005_03 binary over from a very similar
machine (that has not been rebuilt yet) and it takes 16 seconds for
the same test!!

My benchmarks of 5.005_53 vs 5.8.1 are (Athlon 850, OS/2, no threads):

Load time with -e1: 60ms vs 80ms
Load time of old File::Find: 190ms vs 240ms

So the slowdown is 25% on load of the interpreter, and 33% on compile
of required modules.

However, the "new" File::Find loads 2x slower than the old one (it is
significantly more complicated code now).

I did not detect any striking slowdown of *running* time (but I did
not try to...).

BTW, to answer other question in this thread: after my first rewrite
of Perl's malloc(), it was 2.5x quickier than Solaris one (of the
time), and would use 40% lower memory. For several Perl applications
I tested, this gave (widely varying) speedups centered about 10-15%.

Hope this helps,
Ilya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top