Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

The magic of threads

by barbie (Deacon)
on Nov 17, 2004 at 14:59 UTC ( #408432=note: print w/ replies, xml ) Need Help??


in reply to How to make your Perl 30% faster

There is one single characteristic that is significantly improving your performance. The lack of ithreads support. From your print outs:

The "fast baby":

Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_LARGE_FILES PERL_IMPLICIT_CON +TEXT

and the installed version:

Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL +_IMPLICIT_CONTEXT

The gain from removing threads can vary between 10-40% in the tests we've done. However, you are not comparing like for like. The installed version is based on 5.8.0 and your fast version is based on 5.8.5.

Unfortunately RH, and probably several other distros, come with a threaded Perl. Even though when 5.8.0 was released, ithreads were not recommended for production environments. From what I understand, ithreads support is much more stable now.

--
Barbie | Birmingham Perl Mongers user group | http://birmingham.pm.org/


Comment on The magic of threads
Select or Download Code
Re: The magic of threads
by Luca Benini (Scribe) on Nov 17, 2004 at 15:43 UTC
    You opinion about this it's nice. But also compiler version and perl version can giustify performance increase
      They can indeed. However, in this case the biggest factor is the none use of ithreads. In the tests we did here we did a like for like test, which showed a significant improvement when we simply recompiled without ithread support. If we were to add compiler flags I'm sure we could improve further, but as others have mentioned, adding further optimisations could have side effects.

      --
      Barbie | Birmingham Perl Mongers user group | http://birmingham.pm.org/

        I would expect the real gain to come from getting rid of PERL_IMPLICIT_CONTEXT/MULTIPLICITY (in addition to ithreads). Can you show perl -V from your tests?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-07-29 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (213 votes), past polls