summaryrefslogtreecommitdiffstats
path: root/benchmark/dict_bench.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 20:11:43 -0400
committerDavid Robillard <d@drobilla.net>2021-09-10 20:54:28 -0400
commitb8461860b40f721fd9949ceb5c012c46f914445d (patch)
tree16544ca09a5aa373e205920e7fbb8835282e1b67 /benchmark/dict_bench.c
parent497b0a9fb716023b73bb5fc1c8c451da11ba32d8 (diff)
downloadzix-b8461860b40f721fd9949ceb5c012c46f914445d.tar.gz
zix-b8461860b40f721fd9949ceb5c012c46f914445d.tar.bz2
zix-b8461860b40f721fd9949ceb5c012c46f914445d.zip
Replace CRC32 digest with more modern and appropriate algorithms
This makes the hassle of platform-specific code go away, and instead uses portable implementations of relatively standard modern hash algorithms. CRC32 is not great as a hash function anyway, though it is very fast when hardware accelerated.
Diffstat (limited to 'benchmark/dict_bench.c')
-rw-r--r--benchmark/dict_bench.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/dict_bench.c b/benchmark/dict_bench.c
index 3ba33f9..952aae3 100644
--- a/benchmark/dict_bench.c
+++ b/benchmark/dict_bench.c
@@ -52,7 +52,7 @@ lcg64(const uint64_t i)
static uint32_t
zix_chunk_hash(const ZixChunk* const chunk)
{
- return zix_digest_add(zix_digest_start(), chunk->buf, chunk->len);
+ return zix_digest32(0u, chunk->buf, chunk->len);
}
static bool