summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-22 06:12:19 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-22 06:12:19 +0000
commit73aa08d82d68b47f46cff025f2ae668980d649f6 (patch)
tree99d5dd713be02af25cad50def01d3624625379ad /searchcore
parentf936993576920fa1e729ef79b17bdc7d917e73df (diff)
Maintain the cached bitCount to avoid cost query time.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
index 24ae86760c9..d2490985e77 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
@@ -94,7 +94,7 @@ LidStateVector::setBit(unsigned int idx)
_highest = idx;
}
assert(!_bv.testBit(idx));
- _bv.slowSetBit(idx);
+ _bv.setBitAndMaintainCount(idx);
++_count;
assert(_count == internalCount());
}
@@ -105,7 +105,7 @@ LidStateVector::clearBit(unsigned int idx)
{
assert(idx < _bv.size());
assert(_bv.testBit(idx));
- _bv.slowClearBit(idx);
+ _bv.clearBitAndMaintainCount(idx);
--_count;
assert(_count == internalCount());
maybeUpdateLowest();