Show
Ignore:
Timestamp:
01/06/07 03:26:50 (2 years ago)
Author:
krobillard
Message:

Thune - Tweaked scripts/nsieve.t

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/scripts/nsieve.t

    r337 r338  
    44  http://shootout.alioth.debian.org/ 
    55  
    6   C       0.610 sec. 
    7   Python  5.392 sec. 
     6  C       0.610 sec.  5 MB 
     7  Python  5.392 sec.  > 40MB 
    88*/ 
    99 
     
    3535*/ 
    3636 
    37 ; 6.254 sec. 
    38 [size | count i j flags] 
     37; 6.287 sec.  5 MB 
     38[size | count i j] 
    3939[ 
    40     #{} copy size 1 fill :flags 
    4140    0 :count 
    42  
    43     flags 2 skip 
     41    #{} copy size 1 fill 2 skip 
    4442    [ 
    4543        :i 
     
    5048            [ 
    5149                0 1 poke drop 
    52                 j skip 
     50                j skip  ; May break in the future 
    5351            ] 
    5452            iter 
     
    5755    iter 
    5856 
    59     ;count 
     57    none :i recycle 
    6058    ["Primes up to" size count] print 
    6159] 
    62 func :nsieve    ; (size -- count) 
     60func :nsieve    ; (size -- ) 
    6361 
    6462int! args/1 make :n