Is perl 5.8 slower than 5.005_03?

Discussion in 'Perl Misc' started by Jon Reed, Dec 4, 2003.

  1. Jon Reed

    Jon Reed Guest

    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
    Jon Reed, Dec 4, 2003
    #1
    1. Advertising

  2. Jon Reed

    Ben Morrow Guest

    (Jon Reed) wrote:
    > 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

    --
    We do not stop playing because we grow old;
    we grow old because we stop playing.
    Ben Morrow, Dec 4, 2003
    #2
    1. Advertising

  3. [A complimentary Cc of this posting was sent to
    Jon Reed
    <>], who wrote in article <>:
    > 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
    Ilya Zakharevich, Dec 4, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. abilash
    Replies:
    1
    Views:
    555
    Jim Lewis
    May 17, 2005
  2. Andre Charbonneau

    XPath queries getting slower and slower...

    Andre Charbonneau, Feb 15, 2005, in forum: Java
    Replies:
    0
    Views:
    529
    Andre Charbonneau
    Feb 15, 2005
  3. Replies:
    2
    Views:
    420
    Greg Buchholz
    Feb 1, 2006
  4. @
    Replies:
    53
    Views:
    605
    John Postlethwait
    Oct 21, 2004
  5. Yahav
    Replies:
    10
    Views:
    206
    Tad McClellan
    Mar 23, 2005
Loading...

Share This Page