Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Speed up hash initialization loop

by roboticus (Chancellor)
on Jan 30, 2013 at 13:46 UTC ( #1016061=note: print w/ replies, xml ) Need Help??


in reply to Re: Speed up hash initialization loop
in thread Speed up hash initialization loop

bulk88:

So the compiler doesn't do a 'common subexpression elimiation' optimization? Or does it do such a thing, but it can't optimize that due to the possibility of too much "magic" going on?

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re^2: Speed up hash initialization loop
Replies are listed 'Best First'.
Re^3: Speed up hash initialization loop
by bulk88 (Priest) on Jan 30, 2013 at 21:25 UTC
    Correct. $profEvntVar may be magical and return a different hash every time its read. In that hash, slice {$customProf} might be magical and different every time. If you write the var X many times in source, it will be called/read X many times in source. There is no caching.
Re^3: Speed up hash initialization loop
by austinj (Acolyte) on Jan 30, 2013 at 14:33 UTC
    I'm not using a compiler... actually I didn't even know there where perl compilers, but if you point me in the right direction I'd be happy to learn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2015-07-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls