summaryrefslogtreecommitdiffstats
path: root/benchmark/dict_bench.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/dict_bench.c')
-rw-r--r--benchmark/dict_bench.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/benchmark/dict_bench.c b/benchmark/dict_bench.c
index bf8a91a..5d9acd0 100644
--- a/benchmark/dict_bench.c
+++ b/benchmark/dict_bench.c
@@ -1,9 +1,17 @@
-// Copyright 2011-2021 David Robillard <d@drobilla.net>
+// Copyright 2011-2023 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
#include "bench.h"
#include "warnings.h"
+typedef struct {
+ char* buf;
+ size_t len;
+} ZixChunk;
+
+#define ZIX_HASH_KEY_TYPE ZixChunk
+#define ZIX_HASH_RECORD_TYPE ZixChunk
+
#include "zix/attributes.h"
#include "zix/digest.h"
#include "zix/hash.h"
@@ -22,11 +30,6 @@ ZIX_RESTORE_WARNINGS
#include <time.h>
typedef struct {
- char* buf;
- size_t len;
-} ZixChunk;
-
-typedef struct {
ZixChunk* chunks;
size_t n_chunks;
char* buf;
@@ -42,8 +45,8 @@ lcg64(const uint64_t i)
return (a * i) + c;
}
-ZIX_PURE_FUNC static const void*
-identity(const void* record)
+ZIX_PURE_FUNC static const ZixChunk*
+identity(const ZixChunk* record)
{
return record;
}