summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-06-21 12:38:06 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-06-29 08:32:59 +0200
commitb46359c11b879d610997eb1e9069e943e19c4244 (patch)
tree1a10bcb91f97416c785d1d29e0c47ab99a52eb82 /include
parentfdb50b8256f1038d5bc4f906b41605cacc769bf4 (diff)
downloadouroboros-b46359c11b879d610997eb1e9069e943e19c4244.tar.gz
ouroboros-b46359c11b879d610997eb1e9069e943e19c4244.zip
lib: Add MurmurHash3 hash_mix64 for hash tables
Adds a (non-cryptographic) MurmurHash3 fmix64 finalizer for hashing an integer key to a table index, replacing the MD5-based bucket hashing in the pft. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/hash.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ouroboros/hash.h b/include/ouroboros/hash.h
index 17ab98ac..c6609ffc 100644
--- a/include/ouroboros/hash.h
+++ b/include/ouroboros/hash.h
@@ -89,4 +89,7 @@ void str_hash(enum hash_algo algo,
void * dst,
const char * str);
+/* Non-cryptographic finalizer for hashing an integer key to a table index. */
+uint64_t hash_mix64(uint64_t key);
+
#endif /* OUROBOROS_LIB_HASH_H */