Optimize hash map operations in the query system
This commit is contained in:
parent
01dc45c10e
commit
fcd3349d14
6 changed files with 46 additions and 37 deletions
|
@ -38,6 +38,8 @@
|
|||
#![feature(unwrap_infallible)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
extern crate hashbrown;
|
||||
|
||||
use std::fmt;
|
||||
|
||||
pub use atomic_ref::AtomicRef;
|
||||
|
|
|
@ -256,7 +256,7 @@ impl<K: Eq + Hash + Copy + IntoPointer> ShardedHashMap<K, ()> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn make_hash<K: Hash + ?Sized>(val: &K) -> u64 {
|
||||
pub fn make_hash<K: Hash + ?Sized>(val: &K) -> u64 {
|
||||
let mut state = FxHasher::default();
|
||||
val.hash(&mut state);
|
||||
state.finish()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue