Syntactic Confectionery Delight | |
PerlMonks |
Re^3: declaring lexical variables in shortest scope: performance?by choroba (Cardinal) |
on Mar 31, 2020 at 11:27 UTC ( [id://11114845]=note: print w/replies, xml ) | Need Help?? |
> it's 50% slower Do you mean you added the my $z=12; to both the subroutines and the lexical one became 50% slower? I can't reproduce that behaviour. Adding it to only one of the subs slows it (35% in my case), but then we are comparing apples and oranges.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|