Skip to content

Commit

Permalink
Optimize pointer hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Apr 8, 2024
1 parent 8d8d34f commit b1f04ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/native/containers/dn-simdhash-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "dn-vector.h"
#include "dn-simdhash.h"
#include "dn-simdhash-utils.h"

typedef struct {
int i;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b1f04ae

Please sign in to comment.