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