]> gitweb.factorcode.org Git - factor.git/blob - extra/benchmark/json/json.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / extra / benchmark / json / json.factor
1 ! Copyright (C) 2012 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs json.reader json.writer kernel math math.parser
4 sequences ;
5 IN: benchmark.json
6
7 : json-benchmark ( -- )
8     200 <iota> [ [ number>string ] keep ] H{ } map>assoc
9     1,000 [ >json json> ] times drop ;
10
11 MAIN: json-benchmark