Perl: the Markov chain saw | |
PerlMonks |
Re^4: Rewrite Program Using Arraysby ikegami (Patriarch) |
on Mar 27, 2012 at 20:54 UTC ( [id://962025]=note: print w/replies, xml ) | Need Help?? |
Get rid of a scope, use preinc instead of postinc.
Rate loop with vars with map loop sans vars ikegami loop with vars 8324/s -- -19% -20% -22% with map 10241/s 23% -- -1% -4% loop sans vars 10370/s 25% 1% -- -3% ikegami 10666/s 28% 4% 3% -- (Post-increment in void context is optimised to pre-increment, but it's not in void context in "with map".)
In Section
Seekers of Perl Wisdom
|
|