Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^7: "exists $hash{key}" is slower than "$hash{key}"

by swl (Priest)
on Jan 08, 2020 at 23:50 UTC ( #11111212=note: print w/replies, xml ) Need Help??


in reply to Re^6: "exists $hash{key}" is slower than "$hash{key}"
in thread "exists $hash{key}" is slower than "$hash{key}"

Yes, the lexical variables are part of the absolute timings.

However, it's the relative timings that are of interest in this case as the point of the exercise was to assess the difference between exists $h{$k} or $h{$k}. If all other components are held constant then the timing differences should be due to the use of either of the two idioms (noting that the benchmarks need to be updated given dave_the_m's comments in 341121).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11111212]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2020-09-27 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (142 votes). Check out past polls.

    Notices?