benchmark.sort: make the numbers-to-sort at parse time...

db4
John Benediktsson 2012-09-06 07:54:29 -07:00
parent ffab88d5e9
commit e94857db50
1 changed files with 5 additions and 4 deletions

View File

@ -1,9 +1,10 @@
USING: io.files io.encodings.ascii kernel math math.parser
random sequences sorting ;
USING: io.files io.encodings.ascii kernel literals math
math.parser random sequences sorting ;
IN: benchmark.sort
CONSTANT: numbers-to-sort $[ 300,000 200 random-integers ]
: sort-benchmark ( -- )
10 300000 200 random-integers
[ natural-sort drop ] curry times ;
10 [ numbers-to-sort natural-sort drop ] times ;
MAIN: sort-benchmark