Module musli_zerocopy::swiss
source · Expand description
A ZeroCopy Map
and Set
based on Google’s SwissTable algorithm.
While this results in slower map representation than phf
, it is more
suitable for large data sets.
This implementation is derived from the hashbrown
crate, but has been
modified to:
- Write directly into a pre-allocated buffer rather that allocate internally.
- Tolerate unexpected representations. Since a loaded variant of this table can tolerate most byte representations we need to ensure that the table at most errors and don’t end up exhibiting some under-specified behavior like looping forever on lookups.
Modules§
- A map which implements a hash-map like interface, where values can be looked up by keys.
- A set which implements a hash-set like interface, where values can be looked up by keys.
Structs§
- A stored reference to a map.
- A stored reference to a set.
Functions§
- Store a SwissTable map into an
OwnedBuf
. - Store a SwissTable set into an
OwnedBuf
.