Switch to fxhash for fast hashing.

This commit is contained in:
Stephen Chung
2021-01-15 23:30:45 +08:00
parent 9e2c1a5860
commit 1c7884f0d8
3 changed files with 6 additions and 3 deletions

View File

@@ -61,8 +61,10 @@ impl BuildHasher for StraightHasherBuilder {
pub fn get_hasher() -> impl Hasher {
#[cfg(feature = "no_std")]
let s: ahash::AHasher = Default::default();
// #[cfg(not(feature = "no_std"))]
// let s = crate::stdlib::collections::hash_map::DefaultHasher::new();
#[cfg(not(feature = "no_std"))]
let s = crate::stdlib::collections::hash_map::DefaultHasher::new();
let s: fxhash::FxHasher64 = Default::default();
s
}