aboutsummaryrefslogtreecommitdiff
path: root/examples/tree.c
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-07-13 06:40:05 +0100
committerKatharina Fey <kookie@spacekookie.de>2019-07-13 06:47:21 +0100
commit9130e47b171c5182ffe6c14eb710fdcb73943de4 (patch)
treeca76fcc58130b53c794c99adc7658b3b51075639 /examples/tree.c
parentd0cca976be6fb90f3724911c8a124bce56b3c5f9 (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 'examples/tree.c')
-rw-r--r--examples/tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tree.c b/examples/tree.c
index e55acb9..eb1b33a 100644
--- a/examples/tree.c
+++ b/examples/tree.c
@@ -30,17 +30,17 @@ int main()
if(e) return e;
// Add the d node to c
- e = bowl_insert(c, d);
+ e = bowl_append(c, d);
if(e) e;
// Add other nodes to root
- e = bowl_insert(root, a);
+ e = bowl_append(root, a);
if(e) return e;
- e = bowl_insert(root, b);
+ e = bowl_append(root, b);
if(e) return e;
- e = bowl_insert(root, c);
+ e = bowl_append(root, c);
if(e) return e;
e = bowl_free(root);
return e;
-} \ No newline at end of file
+}