1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel locals math ranges math.parser sequences ;
6 ! http://crazybob.org/BeustSequence.java.html
8 :: (count-numbers) ( remaining first value used max listener: ( -- ) -- ? )
9 10 first - <iota> [| i |
13 used mask bitand zero? [
28 ] any? ; inline recursive
30 :: count-numbers ( max listener -- )
31 10 <iota> [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ; inline
33 :: beust2-benchmark ( -- )
35 5000000000 [ i 1 + i! ] count-numbers
38 MAIN: beust2-benchmark