summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-09-04 10:55:34 -0700
committerOri Bernstein <ori@mmarkovcorp.com>2017-09-04 10:55:53 -0700
commitbff5417fece9ae857ba09de40f1a0823bead52fc (patch)
treea8bbc2f28f5e9a8626af20bb37f5a41490db548f /bench
parent2b28c30518e4aeb4bfc5592773662b89c58e8663 (diff)
downloadmc-bff5417fece9ae857ba09de40f1a0823bead52fc.tar.gz
Do 1000 allocs at once.
Let's not benchmark call overhead.
Diffstat (limited to 'bench')
-rw-r--r--bench/copious-allocs.myr7
1 files changed, 5 insertions, 2 deletions
diff --git a/bench/copious-allocs.myr b/bench/copious-allocs.myr
index ca450a7..5b87b9f 100644
--- a/bench/copious-allocs.myr
+++ b/bench/copious-allocs.myr
@@ -16,8 +16,11 @@ const main = {
const alloc_one = {ctx
var a : int#
- a = std.alloc()
- std.free(a)
+
+ for var i = 0; i < 1000; i++
+ a = std.alloc()
+ std.free(a)
+ ;;
}
const alloc_fwdfwd = {ctx