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

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