[PATCH] D18345: Fix DenseMap::reserve(): the formula was wrong
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 11:34:06 PDT 2016
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
I'm a bit turned around with all these related/similar reviews, but I think this is in a good state now.
Thanks for your patience.
================
Comment at: unittests/ADT/DenseMapTest.cpp:371
@@ +370,3 @@
+ // Formula from DenseMap::getMinBucketToReserveForEntries()
+ const int ExpectedMaxInitialEntries = ExpectedInitialBucketCount * 3 / 4 - 1;
+
----------------
I wouldn't expect to see this formula in the test case (since buckets are an implementation detail of the data structure) - maybe just hard code it to 47 as the max initial entries?
http://reviews.llvm.org/D18345
More information about the llvm-commits
mailing list