Improve the PtrSet to be as simple and small as possible

This commit is contained in:
gingerBill
2023-01-04 13:30:27 +00:00
parent b3a55b8b6f
commit d06a0e7093
5 changed files with 162 additions and 207 deletions

View File

@@ -41,7 +41,7 @@ gb_internal gb_inline u32 ptr_map_hash_key(uintptr key) {
u32 word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u;
res = (word >> 22u) ^ word;
#endif
return res ^ (res == MAP_SENTINEL);
return res;
}
gb_internal gb_inline u32 ptr_map_hash_key(void const *key) {
return ptr_map_hash_key((uintptr)key);