]> gitweb.factorcode.org Git - factor.git/commitdiff
benchmark.sort: changing to not depend on benchmark.random.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 6 Sep 2012 04:03:52 +0000 (21:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 6 Sep 2012 04:03:52 +0000 (21:03 -0700)
extra/benchmark/sort/sort.factor

index 983a9e86b1017c066e504e04b00b82d68e8028a8..4171bb71963120927c82ace21ef37a8536388260 100644 (file)
@@ -1,10 +1,9 @@
-USING: kernel sequences sorting benchmark.random math.parser
-io.files io.encodings.ascii ;
+USING: io.files io.encodings.ascii kernel math math.parser
+random sequences sorting ;
 IN: benchmark.sort
 
 : sort-benchmark ( -- )
-    random-numbers-path
-    ascii file-lines [ string>number ] map
-    natural-sort drop ;
+    10 300000 200 random-integers
+    [ natural-sort drop ] curry times ;
 
 MAIN: sort-benchmark