From 9953f12e21d3901d8158c59368715c1d7b01b0c6 Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Wed, 21 Feb 2024 11:44:18 +0100 Subject: Move update_hash(), insert_string() and quick_insert_string() out of functable and remove SSE4.2 and ACLE optimizations. The functable overhead is higher than the benefit from using optimized functions. --- insert_string.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 insert_string.c (limited to 'insert_string.c') diff --git a/insert_string.c b/insert_string.c new file mode 100644 index 0000000000..11a5b97ffe --- /dev/null +++ b/insert_string.c @@ -0,0 +1,21 @@ +/* insert_string.c -- insert_string integer hash variant + * + * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + */ + +#include "zbuild.h" +#include "deflate.h" + +#define HASH_SLIDE 16 + +#define HASH_CALC(h, val) h = ((val * 2654435761U) >> HASH_SLIDE); +#define HASH_CALC_VAR h +#define HASH_CALC_VAR_INIT uint32_t h = 0 + +#define UPDATE_HASH update_hash +#define INSERT_STRING insert_string +#define QUICK_INSERT_STRING quick_insert_string + +#include "insert_string_tpl.h" -- cgit 0.0.5-2-1-g0f52