From feeba1de8d9774e32007686627a6a5633dff2559 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 6 May 2024 09:40:11 -0400 Subject: Missing file from last commit --- include/shard/TrieSpline.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include/shard/TrieSpline.h') diff --git a/include/shard/TrieSpline.h b/include/shard/TrieSpline.h index 3ae72f8..581277e 100644 --- a/include/shard/TrieSpline.h +++ b/include/shard/TrieSpline.h @@ -117,7 +117,7 @@ public: m_reccnt = info.record_count; m_tombstone_cnt = info.tombstone_count; - if (m_reccnt > 0) { + if (m_reccnt > 50) { m_ts = bldr.Finalize(); } } @@ -217,7 +217,7 @@ public: m_reccnt = info.record_count; m_tombstone_cnt = info.tombstone_count; - if (m_reccnt > 0) { + if (m_reccnt > 50) { m_ts = bldr.Finalize(); } } @@ -273,6 +273,18 @@ public: } size_t get_lower_bound(const K& key) const { + if (m_reccnt < 50) { + size_t bd = m_reccnt; + for (size_t i=0; i= key) { + bd = i; + break; + } + } + + return bd; + } + auto bound = m_ts.GetSearchBound(key); size_t idx = bound.begin; -- cgit v1.2.3