]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/nsieve/nsieve.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / extra / benchmark / nsieve / nsieve.factor
index 6fbc144e8078ba76573de611446d0560cda9893e..646c98f3a4214f2da60b9e0b06fecb31676d0b7c 100644 (file)
@@ -1,6 +1,6 @@
-IN: benchmark.nsieve
 USING: math math.parser sequences sequences.private kernel
 arrays make io ;
+IN: benchmark.nsieve
 
 : clear-flags ( step i seq -- )
     2dup length >= [
@@ -13,14 +13,14 @@ arrays make io ;
     2dup length < [
         2dup nth-unsafe [
             over dup 2 * pick clear-flags
-            rot 1+ -rot ! increment count
-        ] when [ 1+ ] dip (nsieve)
+            rot 1 + -rot ! increment count
+        ] when [ 1 + ] dip (nsieve)
     ] [
         2drop
     ] if ; inline recursive
 
 : nsieve ( m -- count )
-    0 2 rot 1+ t <array> (nsieve) ;
+    0 2 rot 1 + t <array> (nsieve) ;
 
 : nsieve. ( m -- )
     [ "Primes up to " % dup # " " % nsieve # ] "" make print ;