in reply to Re: declaring lexical variables in shortest scope: performance?
in thread declaring lexical variables in shortest scope: performance?
Thanks for the compare script. Indeed the lexical is a bit faster (probably what tobyink said about internal optimisations) and is confirmed by choroba but when I declare a lexical variable inside the loop for my $x (1,2,3) {my $z=12; $y+=$x } in predecl, it's 50% slower :(
I keep what you said about optimisation is a science
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: declaring lexical variables in shortest scope: performance?
by choroba (Cardinal) on Mar 31, 2020 at 11:27 UTC | |
by bliako (Abbot) on Mar 31, 2020 at 11:58 UTC | |
by LanX (Saint) on Mar 31, 2020 at 12:00 UTC | |
by bliako (Abbot) on Mar 31, 2020 at 12:14 UTC | |
by LanX (Saint) on Mar 31, 2020 at 12:31 UTC | |
|