On Fri, 3 Mar 2023, 18:09 Andrey Semashev via Std-Proposals, <std-proposals@lists.isocpp.org> wrote:
On 3/3/23 19:52, Jason McKesson via Std-Proposals wrote:
> On Fri, Mar 3, 2023 at 4:53 AM Andrey Semashev via Std-Proposals
> <std-proposals@lists.isocpp.org> wrote:
>> or if `import std` is more expensive than `#include <cstddef>` (or pick any
>> other lightweight header)
> We already have an answer to this. There's evidence, from the compiler
> that supports a standard library import, that it is close to an order
> of magnitude faster to `import std;` than to include even one header.
> The evidence is listed in P2412.

While this is better than nothing (thanks for sharing the reference to
the proposal), this is just one implementation on a platform that is
infamous for its slow filesystem. Given the history with precompiled
headers, which offered a significant speedup with MSVC on Windows and
nearly no benefit on other platforms, I'll keep my reservations until I
see numbers on other platforms and implementations.

It's true for gcc too, based on testing a local patch.

> I know there are a lot of questions about modules out there. But
> people keep reraising these questions as if there aren't already
> answers to at least some of them.

I would say, that's because finding this kind of information is
virtually impossible unless you follow closely the particular proposals
or on the discussions on the MLs and reflectors.

Std-Proposals mailing list