Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Trading compile time for faster runtime?

by hv (Prior)
on Apr 20, 2022 at 20:59 UTC ( [id://11143144]=note: print w/replies, xml ) Need Help??


in reply to Trading compile time for faster runtime?

Certainly much has been done in this area. Dave Mitchell did a lot of work in recent years (some of it under a targetted "make perl faster" grant from Booking.com, I believe) that included creating new compound opcodes for certain common patterns. However it is very hard to identify patterns that would benefit from this _in the general case_, and each one requires a lot of work followed by a lot more debugging.

For specific cases, as stevieb says, the starting point is benchmarking to identify where the time is going. Once you have the benchmarks, it's worth spending a lot of time thinking about different algorithms that could improve things - these are the things that could have effects in orders of magnitude, but might require some reengineering of the code - before starting to look at micro-optimizations at the perl level, or maybe rewriting certain core loops in C.

  • Comment on Re: Trading compile time for faster runtime?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found