Commit 498168d8 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix this to be closer to CPython's implementation

parent 36bac9a5
......@@ -479,7 +479,7 @@ private:
unsigned NewNumEntries = getNumEntries() + 1;
unsigned NumBuckets = getNumBuckets();
if (LLVM_UNLIKELY(NewNumEntries * 3 >= NumBuckets * 2)) {
this->grow(NumBuckets * (NumBuckets > 50000 ? 2 : 4));
this->grow(NewNumEntries * (NewNumEntries > 50000 ? 2 : 4));
LookupBucketFor(Key, TheBucket);
NumBuckets = getNumBuckets();
} else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment