Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Nested evals - are they evil? (sample benchmarks)by cLive ;-) (Prior) |
on Jul 31, 2007 at 07:05 UTC ( [id://629753]=note: print w/replies, xml ) | Need Help?? |
Hmmm, well, I stripped it down further:
And got this (I think the effectively empty eval is meaningless - see here where I ran it 4 times): I have a feeling an empty eval gets optimized away at compile time (though I am most probably wrong :) How about if I add in an increment do ensure each eval has to be 'eval'd, ie I get this: Either way, I still haven't been able to create a counter example that shows eval to be faster. But anyway, considering the number of runs a second, I have a feeling my energies are probably better spent focusing on other parts of the code as far as optimizations are concerned :)
In Section
Seekers of Perl Wisdom
|
|