]> gitweb.factorcode.org Git - factor.git/commitdiff
benchmark.parse-bignum: adding a bignum parse benchmark.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Mar 2013 13:24:25 +0000 (06:24 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Mar 2013 13:24:25 +0000 (06:24 -0700)
extra/benchmark/parse-bignum/parse-bignum.factor [new file with mode: 0644]

diff --git a/extra/benchmark/parse-bignum/parse-bignum.factor b/extra/benchmark/parse-bignum/parse-bignum.factor
new file mode 100644 (file)
index 0000000..856a1a0
--- /dev/null
@@ -0,0 +1,9 @@
+USING: kernel math math.parser sequences ;
+IN: benchmark.parse-bignum
+
+: parse-bignum-benchmark ( -- )
+    3000 iota [
+        2^ [ number>string string>number ] [ assert= ] bi
+    ] each ;
+
+MAIN: parse-bignum-benchmark