ref: 16b5ec849c2886329338f210cb4c90efc26c8b38
parent: befeeb302c131fc318430bbdcdff2a5d3d18c6d0
author: Ori Bernstein <[email protected]>
date: Sat Sep 9 21:06:27 EDT 2017
Add a hash table put benchmark.
--- a/bench/hashit.myr
+++ b/bench/hashit.myr
@@ -25,7 +25,14 @@
std.htget(h, "foo")
;;
std.htfree(h)
- }]
+ }],
+ [.name="htput", .fn={ctx
+ var h = std.mkht(std.strhash, std.streq)
+ for var i = 0; i < 1000; i++
+ std.htput(h, "foo", 123)
+ ;;
+ std.htfree(h)
+ }],
][:])
}