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

            Bug ID: 125334
           Summary: [16/17 Regression] basic std module example compile
                    time doubles when <bits/stdc++.h> is built as header
                    unit
           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: ---

$ cat testcase.C
import std;

int main() {
  std::cout << 123 << std::endl;
}

$ CC=g++-15
$ rm -rf gcm.cache
$ $CC -fmodules -std=c++20 -fsearch-include-path bits/std.cc
$ perf stat -r10 $CC -fmodules -std=c++20 testcase.C
...
0.341537423 +- 0.002332826 seconds time elapsed  ( +-  0.68% )

$ rm -rf gcm.cache
$ $CC -fmodules -std=c++20 -fsearch-include-path bits/stdc++.h bits/std.cc
$ perf stat -r10 $CC -fmodules -std=c++20 testcase.C
...
0.356897251 +- 0.002575109 seconds time elapsed  ( +-  0.72% )


$ CC=g++-16
$ rm -rf gcm.cache
$ $CC -fmodules -std=c++20 -fsearch-include-path bits/std.cc
$ perf stat -r10 $CC -fmodules -std=c++20 testcase.C
...
0.374096264 +- 0.002264572 seconds time elapsed  ( +-  0.61% )

$ rm -rf gcm.cache
$ $CC -fmodules -std=c++20 -fsearch-include-path bits/stdc++.h bits/std.cc
$ perf stat -r10 $CC -fmodules -std=c++20 testcase.C
...
0.756065966 +- 0.002910919 seconds time elapsed  ( +-  0.39% )

Reply via email to