Expand description
AHashMap-backed state store with O(1) lookups and zero-copy reads. AHashMap-backed state store with dual-structure design.
AHashMapStore uses AHashMap<Vec<u8>, Vec<u8>> for O(1) point lookups
and a BTreeMap<Vec<u8>, ()> index for efficient prefix/range scans.
This is the first backend that supports zero-copy get_ref.
§Performance Characteristics
- Get: O(1) average via AHashMap, < 200ns typical
- Get (zero-copy): O(1) via
get_ref(), < 150ns typical - Put: O(1) amortized (hash) + O(log n) (BTreeMap index)
- Delete: O(1) (hash) + O(log n) (BTreeMap index)
- Prefix scan: O(log n + k) via BTreeMap index
- Range scan: O(log n + k) via BTreeMap index
Structs§
- AHash
MapStore - High-performance state store using
AHashMapfor point lookups andBTreeMapfor ordered scans.