C++ Logo

std-proposals

Advanced search

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

From: Adrian Johnston <ajohnston4536_at_[hidden]>
Date: Mon, 25 May 2026 19:51:16 -0700
*>> 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.

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.

Received on 2026-05-26 02:51:29