benchmark.sort: make the numbers-to-sort at parse time...
parent
ffab88d5e9
commit
e94857db50
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue