summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-11-28 18:59:53 +0100
committerHenning Baldersheim <balder@oath.com>2018-11-28 18:59:53 +0100
commitd88040df6fece52b15a5fe27a3777016069de97d (patch)
treef2184a32ec3075f5e567e9bee278cb3cc4e304c8
parent190fa93b41aaca71a9f7fc84a3856a79fc40444d (diff)
Reserve a large hashmap to reduce number of collisions.
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumattribute.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
index 6a5777b5696..527b869431d 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
@@ -104,7 +104,7 @@ EnumAttribute<B>::insertNewUniqueValues(EnumStoreBase::IndexVector & newIndexes)
this->_enumStore.getPendingCompact()) {
this->removeAllOldGenerations();
this->_enumStore.clearPendingCompact();
- EnumIndexMap old2New(this->_enumStore.getNumUniques());
+ EnumIndexMap old2New(this->_enumStore.getNumUniques()*3);
if (!this->_enumStore.performCompaction(extraBytesNeeded, old2New)) {
// fallback to resize strategy
this->_enumStore.fallbackResize(extraBytesNeeded);