r/cpp • 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/attachment

Some 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.

28 Upvotes

29 comments sorted by

View all comments

Show parent comment

7

u/tartaruga232 MSVC user, r/cpp_modules May 26 '26

We're using Visual Studio yes (Insiders + Preview). Intellisense is still broken (which doesn't prevent us from using modules), but a lot of things work quite well (example).

Most importantly: The MSVC compiler is pretty good now. I haven't seen any ICE's anymore for quite some time now (several months).

3

u/Nicksaurus May 26 '26

OK, that actually sounds pretty similar to the clang side of things. Once you enable all the right experimental flags clang trunk + cmake is pretty stable and can compile module code correctly with a few exceptions (I think importing headers is still unsupported? Something like that anyway, I don't remember exactly). Clangd is the main limiting factor at the moment

We'll get there. The glorious utopian modularised future is just over the horizon