Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Perl with internal Benchmark/Profiler

by PetaMem (Priest)
on Jun 15, 2006 at 11:19 UTC ( #555471=perlquestion: print w/ replies, xml ) Need Help??
PetaMem has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

we happen to compile own perl interpreters a lot. Mainly to get up-to-date high-performance Perl Interpreters tailored exactly to our needs. Until now, to check impact of used compiler, compiler flags, perl configuration etc. we simply benchmarked some perl programms of ours.

It would be of great benefit, if there was some pragma or Module belonging to the Perl core, that could give information about the speed of various operations. It is evident, that the result of such benchmarking cannot be some one-dimensional number "this perl interpreter runs with xxx drystones", but rather a table where the speed of list creation, sorting, hash-lookup, iteration etc. would be benchmarked.

Ideally, the output of this would be easily parseable, so we could simply let our compiler run over the weekend and test all the perls with all the relevant flags. This should give us a fairly good overview how the different perls perform. Or didn't you always want to know how a perl-5.9.3 -O3 -msse2 -march=k8 64bit no-multiplicity compares to a 5.8.8 32bit perl -O2 ...

Anyone a hint how to proceed to get an exhaustive set of such benchmark results?

Bye
 PetaMem
    All Perl:   MT, NLP, NLU

Comment on Perl with internal Benchmark/Profiler
Re: Perl with internal Benchmark/Profiler
by dave_the_m (Parson) on Jun 15, 2006 at 11:48 UTC
    Sounds like you want perlbench.

    Note that differences of a few percent are usually noise: the effect of cache alignments etc.

    Dave.

      From what I can say so far: Yes! Strike! That's exactly what I was looking for. Great tool. And I have already seen some very unexpected results. Stay tuned, more to come...

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

Re: Perl with internal Benchmark/Profiler
by perrin (Chancellor) on Jun 15, 2006 at 11:57 UTC
    When I did something like this, I found that turning off threads and debugging (not the perl debugger, but debugging perl itself) made a big diference, and using the Intel compiler made a pretty big one too.
      I can confirm that tendency (from the impressions so far). But my intention is now to get some numbers to get a quantitative statement. Unfortunately, the Intel compiler performs far worse on 64bit Architectures than other options.

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

      Could you please elaborate some HowTo use the icc? After extensively using perlbench, I came to the conclusion that gcc 4.x sucks and tried icc. Unfortunately, I'm getting lots of these:
      icc -L/usr/local/lib -o miniperl \
          miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lcrypt -lutil -lc
      IPO Error: unresolved : PL_comppad
              Referenced in /tmp/ipo_iccuB3iq9.o
      IPO Error: unresolved : PL_regfree
              Referenced in /tmp/ipo_iccuB3iq9.o
      IPO Error: unresolved : PL_regcompp
              Referenced in /tmp/ipo_iccuB3iq9.o
      IPO Error: unresolved : PL_peepp
              Referenced in /tmp/ipo_iccuB3iq9.o
      IPO Error: unresolved : PL_sortcop
              Referenced in /tmp/ipo_iccuB3iq9.o
      ...
      
      ultimatively failing the whole compile process - of course.

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

        Sorry, I didn't have any trouble compiling with it so I can't tell you what the issue is. I was using a 32-bit processor -- Pentium 4, I think.
        Here is a message I sent to the mod_perl list with my results from the test.
Re: Perl with internal Benchmark/Profiler
by vkon (Deacon) on Jun 15, 2006 at 15:49 UTC
    In addition to already mentioned turning off threads/debugging, there could be a reason to try building with perl own memory allocator.

    This immediately brings binary incompatibility, but you can gain dramatic speed improvements on some OSes (PocketPC is one, and win32 is also; I have not tried comparing this elsewhere)

    BR
    vkon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://555471]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-07-23 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (153 votes), past polls