benchmark.busy-loop: make sure fixnum math on 32-bit.

db4
John Benediktsson 2012-06-01 16:26:46 -07:00
parent 53b77247f0
commit 3c775f7bea
1 changed files with 8 additions and 2 deletions

View File

@ -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