Fix performance regression: bignum >float got slower recently
parent
a7c0b356a8
commit
e82144946a
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue