summaryrefslogtreecommitdiff
path: root/bench/intsort.myr
blob: ff69d3ec7aea3eb092c756feff0e59d5e4dd0ec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std
use testr

const main = {
	testr.bench([
		[.name="fill-sort", .fn={ctx; benchsort()}]
	][:])
}

const benchsort = {
	var a, i

	a = std.slalloc(500_000)
	for i = 0; i < a.len; i++
		a[i] = std.randnum()
	;;
	std.sort(a, std.numcmp)
	std.slfree(a)
}