in reply to Re^2: "exists $hash{key}" is slower than "$hash{key}"
in thread "exists $hash{key}" is slower than "$hash{key}"
Well - "if this is the case" - it's most probably for "historical reasons".
I could imagine exists came later and that was the easiest way to implement it, and the pay off for any redesign is too small.
You shouldn't forget that there is much more going on in the background which would need to be replicated, like autovivification and so on.
> One advantage of using exists
I'm not sure I can follow.
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^4: "exists $hash{key}" is slower than "$hash{key}"
by swl (Prior) on Jan 07, 2020 at 00:52 UTC | |
by LanX (Saint) on Jan 07, 2020 at 01:45 UTC | |
by swl (Prior) on Jan 07, 2020 at 03:15 UTC | |
by dave_the_m (Monsignor) on Jan 07, 2020 at 11:08 UTC | |
by swl (Prior) on Jan 09, 2020 at 03:00 UTC | |
| |
by LanX (Saint) on Jan 07, 2020 at 16:00 UTC | |
|