MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RehashStep

Method RehashStep

src/semiorderedset.h:332–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330 }
331
332 void RehashStep()
333 {
334 if (cfPauseRehash)
335 return;
336
337 int steps = 0;
338 for (; idxRehash < (m_data.size()/2); ++idxRehash)
339 {
340 if (m_data[idxRehash] == nullptr)
341 continue;
342
343 CowPtr<vector_type> spvecT;
344 std::swap(m_data[idxRehash], spvecT);
345
346 for (const auto &v : *spvecT)
347 insert(v, true);
348
349 if (++steps > 1024)
350 break;
351 }
352 }
353
354 void grow()
355 {

Callers

nothing calls this directly

Calls 2

swapFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected