1 USING: alien.c-types sequences kernel math specialized-arrays
6 ! Phil Dawes's performance problem
8 : count-ones ( int-array -- n ) [ 1 = ] count ; inline
10 : make-int-array ( -- int-array )
11 120000 [ 255 bitand ] int-array{ } map-as ; inline
13 : dawes-benchmark ( -- )
14 200 make-int-array '[ _ count-ones ] replicate drop ;