Import with #import "std/hash_map".
HashMap :: struct($K: Type, $V: Type) { keys: Vec(K); values: Vec(V); states: Vec(u8); count: s64; removed: s64; }HashKey :: (key: string) -> u64FNV-1a over the key's bytes.
HashKey :: (key: u64) -> u64SplitMix64's finalizer spreads nearby integers across the table.
HashKey :: (key: s64) -> u64HashKey :: (key: u32) -> u64Unsigned keys up to 32 bits; also the closest match for u8 and u16.
HashMapFind :: (map: *HashMap($K, $V), key: K) -> s64The slot holding KEY, or -1.
HashMapHas :: (map: *HashMap($K, $V), key: K) -> boolHashMapGet :: (map: *HashMap($K, $V), key: K, value: *V) -> boolCopies KEY's value into VALUE and returns true, or returns false.
HashMapSet :: (map: *HashMap($K, $V), key: K, value: V)HashMapRemove :: (map: *HashMap($K, $V), key: K) -> boolRemoves KEY and returns whether it was present.
HashMapFree :: (map: *HashMap($K, $V))HashMapGrow :: (map: *HashMap($K, $V))Doubles the table, to at least 8 slots, and reinserts every entry.
HashMapRehash :: (map: *HashMap($K, $V), capacity: s64)Rebuild live entries, discarding deleted slots without growing the table.