You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the default hasher to foldhash
[Foldhash](https://github.com/orlp/foldhash) performs generally better than AHash while still avoiding the pitfalls of FxHash with certain distributions (such as only hashing aligned values).
Copy file name to clipboardExpand all lines: README.md
+3-48
Original file line number
Diff line number
Diff line change
@@ -26,59 +26,14 @@ in environments without `std`, such as embedded systems and kernels.
26
26
## Features
27
27
28
28
- Drop-in replacement for the standard library `HashMap` and `HashSet` types.
29
-
- Uses [AHash](https://github.com/tkaitchuck/aHash) as the default hasher, which is much faster than SipHash.
30
-
However, AHash does *not provide the same level of HashDoS resistance* as SipHash, so if that is important to you, you might want to consider using a different hasher.
29
+
- Uses [foldhash](https://github.com/orlp/foldhash) as the default hasher, which is much faster than SipHash.
30
+
However, foldhash does *not provide the same level of HashDoS resistance* as SipHash, so if that is important to you, you might want to consider using a different hasher.
31
31
- Around 2x faster than the previous standard library `HashMap`.
32
32
- Lower memory usage: only 1 byte of overhead per entry instead of 8.
33
33
- Compatible with `#[no_std]` (but requires a global allocator with the `alloc` crate).
34
34
- Empty hash maps do not allocate any memory.
35
35
- SIMD lookups to scan multiple hash entries in parallel.
36
36
37
-
## Performance
38
-
39
-
Compared to the previous implementation of `std::collections::HashMap` (Rust 1.35).
0 commit comments