And creating several std modules will
- take some (one time) time for building
- takes some time for managing/programming in the source file (the IDE can help, but a human checks each change when committing, etc.)
- the import won't be reduced linearly, there is some absolute overhead
- perhaps the numbers for module import can be optimized further, e.g. forking the compiler state after the std import for the next translation unit or storing more data structures on disc
So the question is, is splitting std the right way?
-----Ursprüngliche Nachricht-----
Von: Jens Maurer via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: Di 26.05.2026 09:26
Betreff: Re: [std-proposals] Benchmarking using the standard library as a module
An: std-proposals@lists.isocpp.org;
CC: Jens Maurer <jens.maurer@gmx.net>;
On 5/26/26 04:51, Adrian Johnston via Std-Proposals wrote:
> You are likely reading this email on a web browser that has over 30,000 C++ files. If you were to try compiling that web browser with an ideal 50ms per-file taken to import the standard library? That is an additional 25 minutes spent executing the single line* import std;* over and over again.
So, what's the alternative? Surely, splitting up standard library includes
will quickly accumulate to more than 50ms per source file, given the numbers
you posted.
Jens
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals