From 39c971f8c43700ddcbb5352ad03167d6cddce1f2 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 14 Oct 2009 04:59:48 -0500 Subject: [PATCH] benchmark: update gc1 and add new gc3 benchmark --- extra/benchmark/gc1/gc1.factor | 2 +- extra/benchmark/gc3/authors.txt | 1 + extra/benchmark/gc3/gc3.factor | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 extra/benchmark/gc3/authors.txt create mode 100644 extra/benchmark/gc3/gc3.factor diff --git a/extra/benchmark/gc1/gc1.factor b/extra/benchmark/gc1/gc1.factor index da3b6bab66..4909496d12 100644 --- a/extra/benchmark/gc1/gc1.factor +++ b/extra/benchmark/gc1/gc1.factor @@ -3,6 +3,6 @@ USING: math sequences kernel ; IN: benchmark.gc1 -: gc1 ( -- ) 10 [ 600000 [ >bignum 1 + ] map drop ] times ; +: gc1 ( -- ) 600000 [ >bignum 1 + ] map drop ; MAIN: gc1 diff --git a/extra/benchmark/gc3/authors.txt b/extra/benchmark/gc3/authors.txt new file mode 100644 index 0000000000..d4f5d6b3ae --- /dev/null +++ b/extra/benchmark/gc3/authors.txt @@ -0,0 +1 @@ +Slava Pestov \ No newline at end of file diff --git a/extra/benchmark/gc3/gc3.factor b/extra/benchmark/gc3/gc3.factor new file mode 100644 index 0000000000..cb8e3ee72a --- /dev/null +++ b/extra/benchmark/gc3/gc3.factor @@ -0,0 +1,11 @@ +! Copyright (C) 2009 Slava Pestov. +! See http://factorcode.org/license.txt for BSD license. +USING: math.parser fry sequences kernel assocs hashtables ; +IN: benchmark.gc3 + +: gc3 ( -- ) + 1000000 iota + 1000000 + '[ [ number>string ] keep _ set-at ] each ; + +MAIN: gc3