C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Benchmarking using the standard library as a module

From: Marcin Jaczewski <marcinjaczewski86_at_[hidden]>
Date: Tue, 26 May 2026 10:46:33 +0200
wt., 26 maj 2026 o 04:51 Adrian Johnston via Std-Proposals
<std-proposals_at_[hidden]> napisaƂ(a):
>
> >> When you say "module build", what does this mean?
>
> There are module source files provided by your compiler vendor for building the C++ standard library. For example:
>
> GNU std module: /usr/include/c++/15/bits/std.cc
> LLVM std module: /usr/lib/llvm-20/share/libc++/v1/std.cppm
>
> >> Also, what "submodule support" are you referring to? The C++ standard doesn't have any submodules; there
> >> are just `std` and `std.compat`.
>
> I was referring to the submodule support that does not exist.
>
> >> And looking at those module use numbers, they seem pretty reasonable; GCC could use some improvement,
> >> but the rest are at least an order of magnitude better than includes.
>
> 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.
>

Isn't this one magnitude faster than including a reasonable part of
standard headers??
How many hours do you need to spend to compile these browsers now?
You post it yourself, the whole std include cost 995ms and growing in
future standards.
This means modules save at least 6h of developers time.


> And if you play video games, the time taken to call import std; on my laptop is also enough time to simulate a complex 3D world and render it to a 3840x2160 screen twice.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2026-05-26 08:46:49