[libcxx-commits] [PATCH] D149543: [libc++][format] Fixes vector<bool> requirements.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 28 08:44:12 PDT 2023


Mordante added a comment.

In D149543#4455780 <https://reviews.llvm.org/D149543#4455780>, @hans wrote:

> In Chromium we noticed that this almost doubled the preprocessed size of `<vector>`, from ca 1.6 MB to 3.2 MB. Since it's a widely included header, that results in ca 8 GB (2.5%) of extra code to compile during a full build.
>
> I realize this change is based on a requirement in the standard, but it seems unfortunate that the cost of the format library is spilling over to vector like this. If there's anything that could be done to reduce the impact here, that would be very valuable to us and presumably other libc++ users too.

Interesting. Am I right to assume most of the new size is due to including `<string>`? 2.5% is quite a bit. I'm not sure whether there is a good solution. (Unfortunately modules are not really usable yet.)

I have verified and the bool formatter really needs a string. It needs to use `truename` which is a `string`
https://en.cppreference.com/w/cpp/locale/numpunct/truefalsename


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149543



More information about the libcxx-commits mailing list