From aab42e97a469f0c16aeb911d3ecf2c41527dbf94 Mon Sep 17 00:00:00 2001 From: Seebs Date: Tue, 26 Mar 2019 15:55:33 -0500 Subject: [PATCH] tune b+tree values Did some benchmarking with b+tree values. The actual interactions appear to be slightly inconsistent; some values seem to help more in cases with higher OpN in benchmarks, others with lower OpN. It appears that the practical consideration may be what happens when a snapshot gets triggered; smaller kx/kd appear to reduce costs there, but increase costs between snapshots. This is a bit of guesswork. Numbers are slighly under powers of 2, because that means that the total actual sizes of k and d end up fitting nicely in alloc pool sizes. --- roaring/btree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roaring/btree.go b/roaring/btree.go index caa0bb46e..662d6e0f6 100644 --- a/roaring/btree.go +++ b/roaring/btree.go @@ -38,9 +38,9 @@ import ( const ( // kx must be >= 2 - kx = 128 //TODO benchmark tune this number if using custom key/value type(s). + kx = 126 //TODO benchmark tune this number if using custom key/value type(s). // kd must be >= 1 - kd = 128 //TODO benchmark tune this number if using custom key/value type(s). + kd = 254 //TODO benchmark tune this number if using custom key/value type(s). ) var (