Return back randomize_hash to WaitFreeHashMap.

This commit is contained in:
levlam 2022-11-24 02:09:04 +03:00
parent 6464cff5ef
commit 276b654f27
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ class WaitFreeHashMap {
uint32 max_storage_size_ = DEFAULT_STORAGE_SIZE;
uint32 get_wait_free_index(const KeyT &key) const {
return (HashT()(key) * hash_mult_) & (MAX_STORAGE_COUNT - 1);
return randomize_hash(HashT()(key) * hash_mult_) & (MAX_STORAGE_COUNT - 1);
}
WaitFreeHashMap &get_wait_free_storage(const KeyT &key) {

View File

@ -29,7 +29,7 @@ class WaitFreeHashSet {
uint32 max_storage_size_ = DEFAULT_STORAGE_SIZE;
uint32 get_wait_free_index(const KeyT &key) const {
return (HashT()(key) * hash_mult_) & (MAX_STORAGE_COUNT - 1);
return randomize_hash(HashT()(key) * hash_mult_) & (MAX_STORAGE_COUNT - 1);
}
WaitFreeHashSet &get_wait_free_storage(const KeyT &key) {