benchmark.busy-loop: make sure fixnum math on 32-bit.
parent
53b77247f0
commit
3c775f7bea
|
@ -1,9 +1,15 @@
|
|||
|
||||
USING: kernel math ;
|
||||
|
||||
IN: benchmark.busy-loop
|
||||
|
||||
: busy-loop ( x -- n )
|
||||
1,000 [
|
||||
1,000 [
|
||||
1,000 [ bitxor ] each-integer
|
||||
] times
|
||||
] times ; inline
|
||||
|
||||
: busy-loop-benchmark ( -- )
|
||||
1,000,000,000 [ 1 - dup 0 > ] loop drop ;
|
||||
1337 [ busy-loop ] [ assert= ] bi ;
|
||||
|
||||
MAIN: busy-loop-benchmark
|
||||
|
|
Loading…
Reference in New Issue