benchmark.json: adding a json benchmark.
parent
a642f39a9a
commit
3928e5cb26
|
@ -0,0 +1,11 @@
|
||||||
|
! Copyright (C) 2012 John Benediktsson
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: assocs json.reader json.writer kernel math math.parser
|
||||||
|
sequences ;
|
||||||
|
IN: benchmark.json
|
||||||
|
|
||||||
|
: json-benchmark ( -- )
|
||||||
|
200 iota [ [ number>string ] keep ] H{ } map>assoc
|
||||||
|
1,000 [ >json json> ] times drop ;
|
||||||
|
|
||||||
|
MAIN: json-benchmark
|
Loading…
Reference in New Issue