Module massa_models::prehash
source · Expand description
pre-hashed trait, for hash less hashmap/set
Structs§
- A
Hasher
forPreHashed
keys 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§
BuildHasherDefault
specialization forHashMapper
HashMap
specialization forPreHashed
keys This hashmap is about 2x faster than the defaultHashMap
HashSet
specialization forPreHashed
keys This hashset is about 2x faster than the defaultHashSet