Module massa_models::prehash
source · Expand description
pre-hashed trait, for hash less hashmap/set
Structs§
- A
HasherforPreHashedkeys that is faster because it avoids re-hashing hashes but simply truncates them. Note: when truncating, it takes the last 8 bytes of the key instead of the first 8 bytes. This is done to circumvent biases induced by first-byte manipulations in addresses related to the thread assignment process
Traits§
- Trait allowing pre-allocations
- A trait indicating that its carrier is already a hash with at least 64 bits and doesn’t need to be re-hashed for hash-table purposes
Type Aliases§
BuildHasherDefaultspecialization forHashMapperHashMapspecialization forPreHashedkeys This hashmap is about 2x faster than the defaultHashMapHashSetspecialization forPreHashedkeys This hashset is about 2x faster than the defaultHashSet