While I completely agree with your sentiment, sometimes it's not premature. Prematurely scolding about premature optimization is, well, premature.
If a snippet of code is utilized in some tight loop, perhaps it IS warranted, and knowing the difference was useful information. It's only 1.5 microseconds, but it's 50% of that particular comparison after Benchmark amortizes the sub calls. That MAY be significant to SOME loops.
While one really shouldn't rely on Perl for hyper-tight loops, sometimes you still want to knock a second or two off of an otherwise sound algorithm. And in the case of @foo vs scalar @foo, I'd say any usefully-competent Perl maintainer will know what's meant by the code.
--
[ e d @ h a l l e y . c c ]
In reply to Re: •Re: Timing of Array-Size Determination Methods
by halley
in thread Timing of Array-Size Determination Methods
by Itatsumaki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |