]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/partial-sums/partial-sums.factor
factor: trim using lists
[factor.git] / extra / benchmark / partial-sums / partial-sums.factor
index 8d78d8d4e8d1334e746262aa316d90c55e06ee06..8fe7e04c66b9eceac745645b554c785ec9cee228 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2008, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: make math math.functions kernel io io.styles prettyprint
-combinators hints fry sequences ;
+USING: make math math.functions kernel prettyprint
+combinators hints sequences ;
 IN: benchmark.partial-sums
 
 ! Helper words
-: summing-integers ( n quot -- y ) [ 0.0 ] [ iota ] [ ] tri* '[ 1 + @ + ] each ; inline
+: summing-integers ( n quot -- y ) [ 0.0 ] [ <iota> ] [ ] tri* '[ 1 + @ + ] each ; inline
 : summing-floats ( n quot -- y ) '[ >float @ ] summing-integers ; inline
 : cube ( x -- y ) dup dup * * ; inline
 : -1^ ( n -- -1/1 ) 2 mod 2 * 1 - ; inline
@@ -38,7 +38,7 @@ IN: benchmark.partial-sums
 
 HINTS: partial-sums fixnum ;
 
-: partial-sums-main ( -- )
+: partial-sums-benchmark ( -- )
     2500000 partial-sums simple-table. ;
 
-MAIN: partial-sums-main
+MAIN: partial-sums-benchmark