! 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
HINTS: partial-sums fixnum ;
-: partial-sums-main ( -- )
+: partial-sums-benchmark ( -- )
2500000 partial-sums simple-table. ;
-MAIN: partial-sums-main
+MAIN: partial-sums-benchmark