]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/fib4/fib4.factor
factor: trim using lists
[factor.git] / extra / benchmark / fib4 / fib4.factor
index c988e5722e6c693762f0e3bf648bf13c12fb5215..2822304d82cc28ad490fe41c6ac679f140c6d439 100644 (file)
@@ -1,4 +1,4 @@
-USING: accessors math kernel debugger ;
+USING: accessors math kernel ;
 IN: benchmark.fib4
 
 TUPLE: box { i read-only } ;
@@ -9,14 +9,14 @@ C: <box> box
     dup i>> 1 <= [
         drop 1 <box>
     ] [
-        i>> 1- <box>
+        i>> 1 - <box>
         dup tuple-fib
         swap
-        i>> 1- <box>
+        i>> 1 - <box>
         tuple-fib
         swap i>> swap i>> + <box>
     ] if ; inline recursive
 
-: fib-main ( -- ) T{ box f 34 } tuple-fib i>> 9227465 assert= ;
+: fib4-benchmark ( -- ) T{ box f 34 } tuple-fib i>> 9227465 assert= ;
 
-MAIN: fib-main
+MAIN: fib4-benchmark