improve performance massively from 0.9 seconds to 0.38 seconds :)

This commit is contained in:
William Bell
2025-09-01 20:25:47 +01:00
parent 4f91bf48f3
commit 19268f3070
24 changed files with 479 additions and 369 deletions

View File

@@ -39,10 +39,6 @@ uint64_t siphash64_bytes(const void *data, size_t len,const uint8_t hash_key[16]
uint8_t out[8];
if (siphash(data, len, hash_key, out, sizeof(out)) != 0)
return 0;
uint64_t hash = 0;
for (int i = 0; i < 8; ++i)
hash |= ((uint64_t)out[i]) << (8 * i);
return hash;
return *(uint64_t *)out;
}