From b1f04aeb47d2681630435fcac446cf05672bad02 Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Mon, 8 Apr 2024 14:23:28 -0700 Subject: [PATCH] Optimize pointer hash --- src/native/containers/dn-simdhash-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/native/containers/dn-simdhash-test.c b/src/native/containers/dn-simdhash-test.c index 53a231671e8aa4..3c8f4afa93f0ae 100644 --- a/src/native/containers/dn-simdhash-test.c +++ b/src/native/containers/dn-simdhash-test.c @@ -9,6 +9,7 @@ #include "dn-vector.h" #include "dn-simdhash.h" +#include "dn-simdhash-utils.h" typedef struct { int i; @@ -72,6 +73,8 @@ int main () { dn_simdhash_instance_data(instance_data_t, test).f = 3.14f; dn_simdhash_instance_data(instance_data_t, test).i = 42; + printf("hash(test)=%u\n", MurmurHash3_32_ptr(test, 0)); + dn_vector_t *keys = dn_vector_alloc(sizeof(DN_SIMDHASH_KEY_T)), *values = dn_vector_alloc(sizeof(DN_SIMDHASH_VALUE_T)); // Ensure consistency between runs