r/cpp • u/tartaruga232 MSVC user, r/cpp_modules • May 26 '26
[std-proposals] Benchmarking using the standard library as a module
https://lists.isocpp.org/std-proposals/att-18441/attachmentSome interesting benchmarks that were posted on the [std-proposals] mailing list.
The link to the entry in the mailing list archive of [std-proposals]:
https://lists.isocpp.org/std-proposals/2026/05/18441.php
For comparison:
For our modularized Windows app1, we see a reduction in build time for a full build from ~3 to ~2 minutes due to using "import std"2.
1Using the MSVC compiler with MSBuild. We currently have 1148 C++ source files, 558 containing "export module". We have 4223 imports, 357 of these are "import std".
2A while ago (~2 months), I made an experimental branch in our (closed) source code repository, which replaces every single "import std" with the minimally required #includes of the standard library headers. That was done in our fully modularized code base.
View all comments
Show parent comment
3
u/azswcowboy May 26 '26
For std i don’t think this is true. The only loss of parallel is for that brief module compile. With your own modules maybe true if the project isn’t factored well.
And frankly, I think the std module compile won’t exist either. The reason is I’ll expect to consume the std from a package manager in the end. We use Conan internally I see nothing that stops me from building it once on our platforms and then copying the results locally like all the open source.
I feel like this is the shakiest part at the moment with compiler ICEs and such. Seems like msvc is past it via reports here, but maybe not the other compilers.