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
|
USING: io.files io.encodings.ascii kernel literals math
|
||||||
random sequences sorting ;
|
math.parser random sequences sorting ;
|
||||||
IN: benchmark.sort
|
IN: benchmark.sort
|
||||||
|
|
||||||
|
CONSTANT: numbers-to-sort $[ 300,000 200 random-integers ]
|
||||||
|
|
||||||
: sort-benchmark ( -- )
|
: sort-benchmark ( -- )
|
||||||
10 300000 200 random-integers
|
10 [ numbers-to-sort natural-sort drop ] times ;
|
||||||
[ natural-sort drop ] curry times ;
|
|
||||||
|
|
||||||
MAIN: sort-benchmark
|
MAIN: sort-benchmark
|
||||||
|
|
Loading…
Reference in New Issue