[PATCH] D18344: Adjust initial size in StringMap constructor to guarantee no grow()

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 17:39:46 PDT 2016

dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Seems good to me otherwise.

Comment at: unittests/ADT/StringMapTest.cpp:385-386
@@ +384,4 @@
+TEST(StringMapCustomTest, InitialSizeTest) {
+  // 1 is an "edge value", 32 is an arbitrary power of two, and 67 is an
+  // arbitrary prime, picked without any good reason.
+  for (auto Size : {1, 32, 67}) {
feels a bit off to say "picked without any good reason" - we should have reasons for things. That doesn't mean the specific values are important, maybe "Sampled test cases - a boundary case, a power of two, and a non-power-of-two" ? Not sure


More information about the llvm-commits mailing list