Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Speed up hash initialization loop

by roboticus (Canon)
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
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
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.

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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-07-13 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (246 votes), past polls