shithub: mc

Download patch

ref: b0fd36e3db14286bc1408aacb8ff7273a85dd251
parent: 16b5ec849c2886329338f210cb4c90efc26c8b38
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Sep 9 21:07:38 EDT 2017

Put a bunch of things into a hash table.

--- a/bench/hashit.myr
+++ b/bench/hashit.myr
@@ -33,6 +33,13 @@
 			;;
 			std.htfree(h)
 		}],
+		[.name="htputmany", .fn={ctx
+			var h = std.mkht(std.inthash, std.inteq)
+			for var i = 0; i < 1000; i++
+				std.htput(h, i, 123)
+			;;
+			std.htfree(h)
+		}],
 	][:])
 }