From 9130e47b171c5182ffe6c14eb710fdcb73943de4 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 13 Jul 2019 06:40:05 +0100 Subject: Adding initial support for HASH nodes This PR adds initial support for HASH data nodes in libbowl. This allows a performant key-value store lookup in a node tree. The hashing code implements the "murmur" hash, which has shown good performance over at [`libcuckoo`]. Currently there is no extended hashing strategy, which should definitely be changed. [`libcuckoo`]: https://github.com/qaul/libcuckoo (currently a collision will cause a recursive re-alloc) Some of the type-level hacks also begs the question if a PAIR data node might be warranted, even though it would break the simple design around bowl->data. --- hash.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 hash.h (limited to 'hash.h') diff --git a/hash.h b/hash.h new file mode 100644 index 0000000..a5d763d --- /dev/null +++ b/hash.h @@ -0,0 +1,11 @@ +#ifndef HASH_H_ +#define HASH_H_ + +#include "bowl.h" + +err_t hash_insert_key(struct bowl *, char *key, struct bowl *); + +err_t hash_remove_key(struct bowl *, char *key, struct bowl **); + +#endif // HASH_H_ + -- cgit v1.2.3