https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124925

            Bug ID: 124925
           Summary: -freflection slows down compilation (of e.g. stdc++.h)
                    by about 20%
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

The culprits seem to be consteval_only_p and check_out_of_consteval_use, each
accounting for about 10% of compile time (this is with an
--enable-checking=release build).

$ perf stat -r5 g++-16 -std=c++26 -fsyntax-only
libstdc++-v3/include/precompiled/stdc++.h
...
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.42
...
$ perf stat -r5 g++-16 -std=c++26 -fsyntax-only -freflection
libstdc++-v3/include/precompiled/stdc++.h
...
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.69
...

Reply via email to