Module map_with_dict

Module map_with_dict 

Source
Expand description

A module providing MapWithDict, an immutable hash map implementation.

MapWithDict is a hash map structure that optimizes for space by utilizing a minimal perfect hash function (MPHF) for indexing the map’s keys. This enables efficient storage and retrieval, as it reduces the overall memory footprint by packing unique values into a dictionary. The MPHF provides direct access to the indices of keys, which correspond to their respective values in the values dictionary. Keys are stored to ensure that get operation will return None if key wasn’t present in original set.

Structs§

MapWithDict
An efficient, immutable hash map with values dictionary-packed for optimized space usage.