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

Re: Optimizing a large project.

by tsee (Curate)
on Jun 13, 2008 at 14:14 UTC ( #691908=note: print w/ replies, xml ) Need Help??


in reply to Optimizing a large project.

"We call a LOT of methods in our system, if we can make calling them faster, it would make a difference."

There is a TODO item in the perltodo about a potential speed-up of the entersub op which needs to be evaluated on every sub call:

entersub-XS-vs-Perl

I had a brief look at it and while I'm not exactly a core hacker, that task seems rather difficult. It's also no fun, so you most likely won't find somebody to do it in his or her spare time. My gut feeling is that you'd have to either try to do that within your organization or try to find a perl core hacker willing to tackle the issue and pay him for it.

A cheaper but certainly tiny optimization might be to replace accessor methods a la sub get_foo { $_[0]->{foo} } with use Class::XS getters => [qw(foo)];. (Same thing for setters, of course.) Unfortunately, that won't fly if you want to do any checking in your accessor methods. Then, you could "steal" the corresponding XS from the aforementioned module and use it as a template to roll your own.

Cheers,
Steffen


Comment on Re: Optimizing a large project.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-28 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls