Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Most effective way to dynamically load a module?

by tilly (Archbishop)
on Aug 22, 2006 at 05:15 UTC ( [id://568766]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Most effective way to dynamically load a module?
in thread Most effective way to dynamically load a module?

Define expensive.

eval isn't free, but it doesn't cost that much. In any case this is all micro-optimization that is unlikely to matter much.

  • Comment on Re^3: Most effective way to dynamically load a module?

Replies are listed 'Best First'.
Re^4: Most effective way to dynamically load a module?
by BerntB (Deacon) on Aug 22, 2006 at 05:47 UTC
    "expensive" here means that I am nervous about this part of the code. :-)

    I think this bit of code (together with unpacking of objects) are in the critical path.

    Hmmm... to compile a single statement with one parameter shouldn't be much more than lex:ing a couple of strings and doing a jump in a parser's jump table, then mallocing a bit memory for the minimal parse tree and probably copying the parameter.

    OK, my instinctive fear of eval might be wrong, here. (-: You can take the compiler from the old C programmer but you can never stop him doing premature optimizations? :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-25 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found