Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Does "preallocating hash improve performance"? Or "using a hash slice"?

by ikegami (Patriarch)
on Feb 23, 2017 at 01:10 UTC ( [id://1182571]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -e'
       sub x {
    ...
      MAX = 127
      MAX = 127  <-- Preallocated even before C<< keys(%h) = 100; >>!
      MAX = 127
    
  2. or download this
    $ perl -MDevel::Peek -e'
       sub x {
    ...
      MAX = 127
      MAX = 7
      MAX = 127
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-19 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found