Zig's HashMap - Part 1

from blog openmymind.net, | ↗ original
This blog posts assumes that you're comfortable with Zig's implementation of Generics. Like most hash map implementations, Zig's std.HashMap relies on 2 functions, hash(key: K) u64 and eql(key_a: K, key_b: K) bool. The hash function takes a key and returns an unsigned 64 bit integer, known as the hash code. The same key always returns the same...