Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by BrowserUk (Pope)
on Nov 17, 2011 at 01:25 UTC ( #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
Node Status?
node history
Node Type: note [id://938503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-07-07 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls