benchmark.flip: adding a benchmark for the "flip" word.

db4
John Benediktsson 2012-09-18 18:40:17 -07:00
parent 9ebd6c11ad
commit 8b49518349
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math sequences ;
IN: benchmark.flip
CONSTANT: my-generic { { 1 2 3 } V{ 4 5 6 } "ABC" }
CONSTANT: my-array { { 1 2 3 } { 4 5 6 } { 7 8 9 } }
: flip-benchmark ( -- )
1,000,000 [ my-generic flip drop ] times
1,000,000 [ my-array flip drop ] times ;
MAIN: flip-benchmark