https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125328
--- Comment #3 from Boris Kolpackov <boris at kolpackov dot net> ---
> Does the difference vanish if you force -std=gnu++20 or -std=gnu++17
> consistently for both releases?
The numbers quoted in the original report were obtained with -std=c++26 for
both compilers. Here are the numbers for gnu++20 (config.cxx.std=gnu++20):
include-hdr import-std import-hdr
--------------------------------------------
GCC 16 2.56s 2.52s 0.90s
GCC 15 2.38s 2.02s 0.90s
And here are the numbers for gnu++17 (config.cxx.std=gnu++17):
include-hdr import-std import-hdr
--------------------------------------------
GCC 16 1.98s - 0.80s
GCC 15 1.96s - 0.84s
Note that the std module fails to compile in gnu++17 for both GCC 15 and 16.
> The import std slowdown in GCC 16 seems to depend on how the std module is
> built.
The std module is built by compiling std.cc (/usr/include/c++/<N>/bits/std.cc)
as a named module.