1
Fork 0

Optimize hash map operations in the query system

This commit is contained in:
John Kåre Alsaker 2023-08-16 17:50:40 +02:00
parent 01dc45c10e
commit fcd3349d14
6 changed files with 46 additions and 37 deletions

View file

@ -38,6 +38,8 @@
#![feature(unwrap_infallible)]
// tidy-alphabetical-end
extern crate hashbrown;
use std::fmt;
pub use atomic_ref::AtomicRef;

View file

@ -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()