diff --git a/extra/benchmark/mt/authors.txt b/extra/benchmark/mt/authors.txt new file mode 100644 index 0000000000..b4bd0e7b35 --- /dev/null +++ b/extra/benchmark/mt/authors.txt @@ -0,0 +1 @@ +Doug Coleman \ No newline at end of file diff --git a/extra/benchmark/mt/mt.factor b/extra/benchmark/mt/mt.factor new file mode 100644 index 0000000000..e586a9e9ad --- /dev/null +++ b/extra/benchmark/mt/mt.factor @@ -0,0 +1,11 @@ +! Copyright (C) 2009 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: fry kernel math random random.mersenne-twister ; +IN: benchmark.mt + +: mt-benchmark ( n -- ) + >fixnum HEX: 533d <mersenne-twister> '[ _ random-32* drop ] times ; + +: mt-main ( -- ) 100000000 mt-benchmark ; + +MAIN: mt-main