0.2.1 |
|
---|---|
0.2.0 |
|
0.1.1 |
|
0.1.0 |
|
#45 in #sets
2MB
110 lines
int_hash
This crate attempts to provide the fastest option for integer key hashmaps in the Rust language.
While the function's performance does seem superior for 64-bit data in benchmarks, it does not clearly surpass fx-hash and seems to be more volatile in practice. Because of this I would recommend the rustc-hash crate for integer hash maps & sets.
lib.rs
:
Very fast, very simple hash algorithm designed for use in integer hash maps & sets.
This crate attempts to provide the fastest option for integer key hashmaps. So the algorithm may change if a better method is found for this use case.
When hashing data larger than 64-bits the hasher will fallback to a secondary algorithm suitable
for arbitrary data (defaults to FxHasher
).
Example
use int_hash::IntHashMap;
let mut map: IntHashMap<u32, &str> = IntHashMap::default();
map.insert(22, "abc");