more useful options | |
PerlMonks |
Re: '%hash = ()' is slower than 'undef %hash'by afoken (Chancellor) |
on May 18, 2018 at 17:35 UTC ( [id://1214869]=note: print w/replies, xml ) | Need Help?? |
%hash = () is slower than undef %hash about 1.2 times [...] What is your opinion? It seems you are micro-optimizing. Unless %hash=() resp. undef %hash takes significant amounts of time (say a minute or more per run), I would simply ignore it. Very likely, other places of your code need much more time and optimizing them gains much more. Hint: Try Devel::NYTProf. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|