From 344cd8ffbf745ae66778abf69c8cdfcc98ae7db2 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Mon, 17 Mar 2025 14:20:20 -0700 Subject: [PATCH] use djb2 hash for now --- src/rdi_make/rdi_make_help.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rdi_make/rdi_make_help.c b/src/rdi_make/rdi_make_help.c index d3b039ac..f85d38a1 100644 --- a/src/rdi_make/rdi_make_help.c +++ b/src/rdi_make/rdi_make_help.c @@ -419,7 +419,13 @@ ASYNC_WORK_DEF(rdim_bake_idx_runs_work) internal U64 rdim_help_hash(RDIM_String8 string) { - return XXH3_64bits(string.str, string.size); + U64 hash = 5381; + U8 *ptr = string.str; + U8 *opl = string.str + string.size; + for (;ptr < opl; ++ptr) { + hash = ((hash << 5) + hash) + (*ptr); + } + return hash; } internal void