summaryrefslogtreecommitdiff
path: root/bench/intsort.myr
diff options
context:
space:
mode:
Diffstat (limited to 'bench/intsort.myr')
-rw-r--r--bench/intsort.myr8
1 files changed, 8 insertions, 0 deletions
diff --git a/bench/intsort.myr b/bench/intsort.myr
index cb7478c..ff69d3e 100644
--- a/bench/intsort.myr
+++ b/bench/intsort.myr
@@ -1,6 +1,13 @@
use std
+use testr
const main = {
+ testr.bench([
+ [.name="fill-sort", .fn={ctx; benchsort()}]
+ ][:])
+}
+
+const benchsort = {
var a, i
a = std.slalloc(500_000)
@@ -8,4 +15,5 @@ const main = {
a[i] = std.randnum()
;;
std.sort(a, std.numcmp)
+ std.slfree(a)
}