shithub: mc

ref: a2ef6bfcd8de0ae9f7f2df2fcdd692bde6ea422c
dir: /bench/intsort.myr/

View raw version
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)
}