Skip to main content

Crate frozndict

Crate frozndict 

Source
Expand description

§frozndict

A memory-efficient, fully immutable dictionary for Python, powered by Rust.

§Overview

frozndict provides a zero-overhead, hashable, immutable mapping type that can be used wherever a frozen alternative to Python’s built-in dict is needed.

The core data structure, frozen_map::FrozenMap, stores entries in a single sorted heap allocation. Lookups run in O(log n) via binary search; the hash is computed once at construction and cached, making repeated hash() calls O(1).

The Python class python::FrozenDict wraps frozen_map::FrozenMap and is exposed to Python as the FrozenDict (and its frozendict alias) type.

§Modules

  • frozen_map - The core Rust data structure.
  • python - PyO3 Python bindings (gated on the python feature flag).

Modules§

frozen_map
FrozenMap
pythonpython
Python Bindings