mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-14 07:57:57 -05:00
18 lines
361 B
TypeScript
18 lines
361 B
TypeScript
//! bench()
|
|
|
|
import quickSort from "./helpers/quickSort.ts";
|
|
import randish from "./helpers/randish.ts";
|
|
import { Range_from } from "./helpers/range.ts";
|
|
|
|
export default function main() {
|
|
let nums = [
|
|
...Range_from(randish())
|
|
.map((x) => Math.floor(5_000 * x))
|
|
.limit(5_000),
|
|
];
|
|
|
|
nums = quickSort(nums, (a, b) => a - b);
|
|
|
|
return nums;
|
|
}
|