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

const main = {
	var a
	var i
	var rng
	var t0, t1

	rng = std.mksrng(123)
	a = std.slalloc(1000000)
	for i = 0; i < a.len; i++
		a[i] = std.rand32(rng)
	;;
	t0 = std.now()
	std.sort(a, std.numcmp)
	t1 = std.now()
	std.put("time = %l\n", t1 - t0)
}