[libcxx-commits] [PATCH] D102727: Use precise growth rather than amortized growth in std::string::resize/__resize_default_init.

Mikhail Maltsev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 19 04:59:07 PDT 2021


miyuki added a comment.

In D102727#2881860 <https://reviews.llvm.org/D102727#2881860>, @mvels wrote:

> [...] which would make me caution on the side of `DTRT` instead of `does the minimum memory thing`. The latter is more a faang thing. I would imagine that a 'stable' user might be surprised with sudden regressions without maybe being too concerned with (temporary) allocations being +/- 20%.

I would say it's not just FAANG. Embedded developers would also benefit from the reduction of memory overhead.

> My suggestion would be to make this the default for UNSTABLE only. Which means we don't create new knobs and defines, but simply #ifdef the few new loc under unstable.

But this change has nothing to do with the ABI.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102727



More information about the libcxx-commits mailing list