30% faster hashing speed

This commit is contained in:
vanhauser-thc
2021-11-06 16:22:38 +01:00
parent da45eb6b41
commit 2ddbaa439c
3 changed files with 1926 additions and 1258 deletions

File diff suppressed because it is too large Load Diff

View File

@ -158,7 +158,7 @@ static void at_exit(int signal) {
} }
#define default_hash(a, b) XXH64(a, b, HASH_CONST) #define default_hash(a, b) XXH3_64bits(a, b)
/* Uninspired gcc plugin instrumentation */ /* Uninspired gcc plugin instrumentation */

View File

@ -90,7 +90,8 @@ inline u32 hash32(u8 *key, u32 len, u32 seed) {
#endif #endif
return (u32)XXH64(key, len, seed); (void)seed;
return (u32)XXH3_64bits(key, len);
} }
@ -102,7 +103,8 @@ inline u64 hash64(u8 *key, u32 len, u64 seed) {
#endif #endif
return XXH64(key, len, seed); (void)seed;
return XXH3_64bits(key, len);
} }