1 USING: assocs kernel literals math random sequences sorting ;
4 CONSTANT: numbers-to-sort $[ 300,000 200 random-integers ]
5 CONSTANT: alist-to-sort $[ 1,000 <iota> dup zip ]
7 : sort-benchmark ( -- )
8 10 [ numbers-to-sort natural-sort drop ] times
9 5,000 [ alist-to-sort sort-keys drop ] times ;