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

Re: Re: A (memory) poor man's hash

by BrowserUk (Pope)
on Nov 22, 2003 at 08:00 UTC ( #309128=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $hash{ $_ } = undef for 1 .. 1_000_000;
    
  2. or download this
    undef $foo{ $_ } for 1 .. 1_000_000;
    
  3. or download this
    use DB_File;
    
    ...
    1069482523
    1069482799  # 276 secs (4.6 mins)
     1000000
    
  4. or download this
    print time; 
    $hash{ substr $_, 0, 4 } .= $/. $_ for 1 .. 1_000_000; $hash{$_} .= $/
    + for keys %hash; 
    ...
    1069484612
    1069484656 # 44 secs.
     1000000
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://309128]
help
Chatterbox?
[Your Mother]: Sure, sure. I had a cat as a kid who always slept on top of the fridge because of the heat dissipation up the back.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-12-18 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (492 votes). Check out past polls.

    Notices?