Expand description
kevy-map — a purpose-built open-addressing hashtable for kevy’s keyspace.
Per-shard, single-threaded, single-trust-domain. Trades std::HashMap’s
generality for three kevy-specific wins:
- Bucket-address API (
prefetch_for_hash, future) — exposes the table’s bucket metadata pointer so the command-batch driver canprefetcht0the next command’s group while finishing the current. - No DoS-hardening tax — single trust domain ⇒ no random seed.
Hasher is
kevy_hash::KevyHash(one-call inlinable). - Cache-conscious layout — Swiss-style metadata bytes scanned (scalar in this commit; SSE2 group scan lands in a later pass); slots AoS so the post-match key+value read hits one cache line.
See the crate README for the design rationale.
Constraints: pure Rust, no crates.io deps; unsafe is allowed here (scoped
to this crate) so kevy-store keeps forbid(unsafe_code).
Structs§
- Iter
(&K, &V)iterator over all live entries of aKevyMap; order unspecified.- IterMut
(&K, &mut V)iterator over all live entries of aKevyMap; order unspecified. Keys stay shared — mutating a key would corrupt its bucket.- KevyMap
- An open-addressing Swiss-style hashtable keyed by
KevyHash. - KevySet
HashSet-shaped wrapper overKevyMap<K, ()>.- Keys
&Kiterator over all live entries of aKevyMap.- SetIter
&Kiterator over all members of aKevySet; order unspecified.- Values
&Viterator over all live entries of aKevyMap.
Traits§
- Kevy
Hash - Single-call hashing for kevy’s per-command hot path.