diff options
author | Ori Bernstein <ori@eigenstate.org> | 2017-09-04 10:55:34 -0700 |
---|---|---|
committer | Ori Bernstein <ori@mmarkovcorp.com> | 2017-09-04 10:55:53 -0700 |
commit | bff5417fece9ae857ba09de40f1a0823bead52fc (patch) | |
tree | a8bbc2f28f5e9a8626af20bb37f5a41490db548f /bench/copious-allocs.myr | |
parent | 2b28c30518e4aeb4bfc5592773662b89c58e8663 (diff) | |
download | mc-bff5417fece9ae857ba09de40f1a0823bead52fc.tar.gz |
Do 1000 allocs at once.
Let's not benchmark call overhead.
Diffstat (limited to 'bench/copious-allocs.myr')
-rw-r--r-- | bench/copious-allocs.myr | 7 |
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 |