Skip to content

Commit e6940fe

Browse files
authored
Increase AttributeStore lookup caches (#914)
1 parent 4c7a0e7 commit e6940fe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/attribute_store.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ const AttributePair& AttributePairStore::getPairUnsafe(uint32_t i) const {
101101
thread_local uint64_t tlsPairLookups = 0;
102102
thread_local uint64_t tlsPairLookupsUncached = 0;
103103

104-
thread_local std::vector<const AttributePair*> cachedAttributePairPointers(64);
105-
thread_local std::vector<uint32_t> cachedAttributePairIndexes(64);
104+
thread_local std::vector<const AttributePair*> cachedAttributePairPointers(256);
105+
thread_local std::vector<uint32_t> cachedAttributePairIndexes(256);
106106
uint32_t AttributePairStore::addPair(AttributePair& pair, bool isHot) {
107107
if (isHot) {
108108
{
@@ -300,8 +300,8 @@ void AttributeSet::finalize() {
300300

301301
// Remember recently queried/added sets so that we can return them in the
302302
// future without taking a lock.
303-
thread_local std::vector<const AttributeSet*> cachedAttributeSetPointers(64);
304-
thread_local std::vector<AttributeIndex> cachedAttributeSetIndexes(64);
303+
thread_local std::vector<const AttributeSet*> cachedAttributeSetPointers(256);
304+
thread_local std::vector<AttributeIndex> cachedAttributeSetIndexes(256);
305305

306306
thread_local uint64_t tlsSetLookups = 0;
307307
thread_local uint64_t tlsSetLookupsUncached = 0;

0 commit comments

Comments
 (0)