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

Re^3: "Just use a hash": An overworked mantra?

by BrowserUk (Patriarch)
on Nov 17, 2011 at 01:25 UTC ( [id://938503]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ## Gen a file of 100e6 random ints:1 .. 999
    perl -E"say 1+ int( rand 999 ) for 1 .. 100e6" > rands.dat
    ...
    ## Same thing using an array:
    [23:06:58.13] c:\test>perl -nlE"++$h[ $_ ] }{ say qq[$_ :: $h[ $_ ]] f
    +or 0 .. $#h" rands.dat > array.res
    [23:07:38.02] c:\test> rem 39.49 seconds
    
  2. or download this
    [ 0:37:15.07] c:\test>perl -nE"$a[$.-1]=0+$_" rands.dat
    [ 0:47:23.27] c:\test>
    
  3. or download this
    #! perl -slw
    use strict;
    ...
    pp \@res;
    
    freeSieve( $sieve );
    
  4. or download this
    [ 0:32:32.61] c:\test>junk1-ic rands.dat 2>nul
    [ 0:33:28.69] c:\test>rem 56.08 seconds
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-16 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found