Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: '%hash = ()' is slower than 'undef %hash'

by roboticus (Chancellor)
on May 18, 2018 at 14:20 UTC ( #1214851=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl pm_hash_clear_vs_undef_1214851.pl
    Checking container differences between delete and clear:
    ...
    delete    38049/s        --       -3%      -39%
    reuse     39358/s        3%        --      -37%
    overwrite 62375/s       64%       58%        --
    
  2. or download this
    $ cat pm_hash_clear_vs_undef_1214851.pl
    use strict;
    ...
            fill_hash(\%h);
        },
    });
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2019-07-18 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?