USING: kernel math math.ranges sequences tools.time ; IN: noise ! it's maaaagic! : noise ( x y -- h ) 57 * + >fixnum dup 13 shift bitor dup dup * 15731 * 789221 + * 1376312589 + HEX: 7fffffff bitand >float 1.0 swap 1073741824.0 / - ; inline : bench-x ( x-dimension -- ) 0 10000 [a,b] [ over noise drop ] each drop ; : bench ( -- ) 0 10000 [a,b] [ bench-x ] each ; : run-bench ( -- ) [ bench ] time ;