[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 10:49:42 PDT 2022


MaskRay added a comment.

In D131465#3776841 <https://reviews.llvm.org/D131465#3776841>, @nikic wrote:

> In D131465#3776599 <https://reviews.llvm.org/D131465#3776599>, @nikic wrote:
>
>> It looks like the switch to `-std=c++17` has some major compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=047c7aa96dadf8a2c71a29e2df610d628d9e7e3e&to=3e99b8d947ac024831e59be2b604ac67a24fed94&stat=instructions The `O0` build of 7zip becomes 80% slower (without codegen changes).
>
> I suspect this is due to increased STL size in in C++17. Taking one sample file, preprocessed source is 289149 bytes with `-std=gnu++14` and 654888 with `-std=gnu++17`. The source size increased by more than a factor of two, so it's not very surprising that the parsing time also increased by the same factor.

Thanks for the analysis. C++'s fault then...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131465



More information about the cfe-commits mailing list