From d88040df6fece52b15a5fe27a3777016069de97d Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Wed, 28 Nov 2018 18:59:53 +0100 Subject: Reserve a large hashmap to reduce number of collisions. --- searchlib/src/vespa/searchlib/attribute/enumattribute.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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::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); -- cgit v1.2.3