]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/dispatch1/dispatch1.factor
factor: trim using lists
[factor.git] / extra / benchmark / dispatch1 / dispatch1.factor
index 1c8701f73f5c3964d52884498b41d519889cd4a9..a26c50b0753a6f6e0a958ef18a2f0169c73c0713 100644 (file)
@@ -1,4 +1,4 @@
-USING: classes kernel sequences vocabs math ;
+USING: classes.tuple kernel sequences vocabs math ;
 IN: benchmark.dispatch1
 
 GENERIC: g ( obj -- obj )
@@ -65,13 +65,13 @@ TUPLE: x30 ;
 M: x30 g ;
 
 : my-classes ( -- seq )
-    "benchmark.dispatch1" words [ tuple-class? ] filter ;
+    "benchmark.dispatch1" vocab-words [ tuple-class? ] filter ;
 
 : a-bunch-of-objects ( -- seq )
     my-classes [ new ] map ;
 
-: dispatch-benchmark ( -- )
+: dispatch1-benchmark ( -- )
     1000000 a-bunch-of-objects
     [ [ g drop ] each ] curry times ;
 
-MAIN: dispatch-benchmark
+MAIN: dispatch1-benchmark