It's really too silly of a concept to warrant the time needed to test it. The three constructs do different things entirely. If there's some situation where you have to care whether it's faster to declare a lexical inside a loop or outside, or whether state consumes more cycles than my, you should probably code that algorithm using Inline::C. ...and that still doesn't address the issue that these three snippets each do different things.
But if you're really interested, Benchmark. It's a snipe hunt though.
Dave
In reply to Re: 'my' and 'state' declaration inside a loop
by davido
in thread 'my' and 'state' declaration inside a loop
by nemesisgus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |