No such thing as a small change | |
PerlMonks |
Re^4: Preferred technique for named subroutine parameters?by shmem (Chancellor) |
on May 23, 2009 at 11:30 UTC ( [id://765817]=note: print w/replies, xml ) | Need Help?? |
Yes, of course. Your benchmark is even more appropriate to show the overhead, which consists in creating, populating and destroying a hash (call with hashref) vs. populating a hash already allocated on the subroutine's pad (call with list). Might be small, but might sum up. Call it a micro-de-optimization, but I see no value in making perl slower for a questionable gain and a loss of readability.
In Section
Seekers of Perl Wisdom
|
|