benchmark.dlists: adding a dlist benchmark.

db4
John Benediktsson 2012-07-13 15:15:26 -07:00
parent 9f56eb6981
commit 8b6e3eab62
1 changed files with 12 additions and 0 deletions

View File

@ -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