[libcxx-commits] [PATCH] D155486: Optimize basic_string's memory usage

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 22 09:49:19 PDT 2023


Mordante added a comment.

Thanks for working on this!



================
Comment at: libcxx/include/string:2330
+        // On first allocation SSO -> long, do not apply a minimum doubling
+        // of capacity/ This results in a minimum allocation size of 48 and we
+        // only need to guarantee amortized growth on subsequent growth.
----------------
Can you add a bit more comment here why this is important. The text in the commit message contains a lot more information. When I read this message I was quite puzzled, after reading the commit message I understood what the reason for these changes are.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155486/new/

https://reviews.llvm.org/D155486



More information about the libcxx-commits mailing list