Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: how to loop through hash tables more efficiently

by Anonymous Monk
on Sep 17, 2012 at 21:17 UTC ( #994110=note: print w/replies, xml ) Need Help??


in reply to Re: how to loop through hash tables more efficiently
in thread updated_again: how to loop through hash tables more efficiently

will generally be faster than fetching a key and then looking up the value.

microscopically faster

  • Comment on Re^2: how to loop through hash tables more efficiently

Replies are listed 'Best First'.
Re^3: how to loop through hash tables more efficiently
by Anonymous Monk on Sep 18, 2012 at 07:27 UTC

    Indeed; the real speed gain comes from the iterator-like workings of each -- no need to build a list of keys to feed to foreach before even starting the loop (and at 20k keys, that costs quite a bit).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994110]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-09-21 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (242 votes). Check out past polls.

    Notices?