in reply to Re^3: "exists $hash{key}" is slower than "$hash{key}"
in thread "exists $hash{key}" is slower than "$hash{key}"
I'm not sure if you got the point, that accessing an outer lexical variable inside a string is not possible.
The Benchmark module is eventually running the code's text thru eval , but inside it's own scope.
The my ($e, $vt, $vf) = (0) x 3; are not accessible from there.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: "exists $hash{key}" is slower than "$hash{key}"
by choroba (Cardinal) on Jan 07, 2020 at 09:53 UTC | |
|
Re^5: "exists $hash{key}" is slower than "$hash{key}"
by swl (Prior) on Jan 07, 2020 at 03:12 UTC | |
by tobyink (Canon) on Jan 07, 2020 at 08:30 UTC | |
by swl (Prior) on Jan 08, 2020 at 23:52 UTC | |
by LanX (Saint) on Jan 07, 2020 at 13:37 UTC | |
by swl (Prior) on Jan 08, 2020 at 23:50 UTC |