diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-07-13 06:40:05 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-07-13 06:47:21 +0100 |
commit | 9130e47b171c5182ffe6c14eb710fdcb73943de4 (patch) | |
tree | ca76fcc58130b53c794c99adc7658b3b51075639 /utils.h | |
parent | d0cca976be6fb90f3724911c8a124bce56b3c5f9 (diff) |
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.
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -13,7 +13,9 @@ err_t _array_search(void **, size_t, size_t *out, void *in); err_t _array_remove(void **, size_t idx, size_t len, void **out); +err_t _hash(char *str, size_t len, size_t *out); + #ifdef __cplusplus } #endif -#endif // _UTIL_H_
\ No newline at end of file +#endif // _UTIL_H_ |