C++ Logo

sg15

Advanced search

Re: A Different Approach To Compiling C++

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Wed, 16 Aug 2023 08:01:07 +0200
On 16/08/2023 01.54, Hassan Sajjad via SG15 wrote:
> Please share your thoughts on this.
>
> Best,
> Hassan Sajjad
>
> On Mon, Aug 14, 2023, 04:51 Hassan Sajjad <hassan.sajjad069_at_[hidden] <mailto:hassan.sajjad069_at_[hidden]>> wrote:
>
> Hi.
>
> Thank you so much for explaining the solution. It is a happy news. With this consensus adoption, my build-system achieves full standard compliance without any modifications required. This is however less optimal compared to solution 5 that I proposed. Depending on different factors, I conjecture that my solution will be up to *40%* faster compared to the current consensus. The compilation speed-up will be more visible in clean builds using C++20 modules / header-units. Here I explain the reasoning behind this: https://github.com/HassanSajjad-302/solution5 <https://github.com/HassanSajjad-302/solution5>.

I've skimmed this. It seems you want to run the compiler as a library,
intercept any loads of header and/or module files, and then kick off
the compilation of those as a "subroutine".

For deeply nested dependency graphs, that seems to mean that compilation
state of many translation units is kept in memory while the respective
compile waits for a dependency to be built. That feels like uncontrolled
resource consumption and doesn't seem to work on small-ish machines
(compared to the project to be built).

Jens

Received on 2023-08-16 06:01:13