diff --git a/extra/benchmark/dlists/dlists.factor b/extra/benchmark/dlists/dlists.factor new file mode 100644 index 0000000000..04c2acfd59 --- /dev/null +++ b/extra/benchmark/dlists/dlists.factor @@ -0,0 +1,12 @@ +! Copyright (C) 2012 John Benediktsson +! See http://factorcode.org/license.txt for BSD license. +USING: deques dlists kernel math sequences ; +IN: benchmark.dlists + +: dlists-benchmark ( -- ) + 5,000 iota [ + [ iota 0 swap >dlist [ + ] slurp-deque ] + [ dup 1 - * 2 / ] bi assert= + ] each ; + +MAIN: dlists-benchmark