]> gitweb.factorcode.org Git - factor.git/commitdiff
Benchmark harness now runs a GC first
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 30 Apr 2009 09:00:54 +0000 (04:00 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 30 Apr 2009 09:00:54 +0000 (04:00 -0500)
extra/benchmark/benchmark.factor

index ca48e6208c8167abf5c495282284d3746513fb7d..220f16fad57e8cdcb5cee5e40c134e1c426f8875 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel vocabs vocabs.loader tools.time tools.vocabs
 arrays assocs io.styles io help.markup prettyprint sequences
-continuations debugger math namespaces ;
+continuations debugger math namespaces memory ;
 IN: benchmark
 
 <PRIVATE
@@ -14,7 +14,7 @@ PRIVATE>
 
 : run-benchmark ( vocab -- )
     [ "=== " write vocab-name print flush ] [
-        [ [ require ] [ [ run ] benchmark ] [ ] tri timings ]
+        [ [ require ] [ gc [ run ] benchmark ] [ ] tri timings ]
         [ swap errors ]
         recover get set-at
     ] bi ;