]> gitweb.factorcode.org Git - factor.git/blob - extra/benchmark/dlists/dlists.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / extra / benchmark / dlists / dlists.factor
1 ! Copyright (C) 2012 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: deques dlists kernel math sequences ;
4 IN: benchmark.dlists
5
6 : dlists-benchmark ( -- )
7     5,000 <iota> [
8         [ <iota> 0 swap >dlist [ + ] slurp-deque ]
9         [ dup 1 - * 2 / ] bi assert=
10     ] each ;
11
12 MAIN: dlists-benchmark