good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
In general:
Your example with a for loop is a bit unfortunate, because aliasing is complicating things considerably. Together with various optimizations performance gains or loses should be unpredictable, especially between different versions of Perl. So benchmark it, I don't think it's worth the effort. °) BTW, for many years it was commonplace that private variables are faster, not sure if accessing package variables has been optimized in the mean time. ...
Cheers Rolf In reply to Re: declaring lexical variables in shortest scope: performance?
by LanX
|
|