Fix performance regression: bignum >float got slower recently

db4
Slava Pestov 2008-05-07 12:32:38 -05:00
parent a7c0b356a8
commit e82144946a
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@ prettyprint words hints ;
IN: benchmark.partial-sums
: summing ( n quot -- y )
[ + ] compose 0.0 -rot 1 -rot (each-integer) ; inline
[ >float ] swap [ + ] 3compose
0.0 -rot 1 -rot (each-integer) ; inline
: 2/3^k ( n -- y ) [ 2.0 3.0 / swap 1- ^ ] summing ;