Sujet : Re: Baby X is bor nagain
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 24. Jun 2024, 13:17:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5bkkt$svuf$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla Thunderbird
On 24/06/2024 09:28, David Brown wrote:
On 24/06/2024 02:56, Scott Lurndal wrote:
bart <bc@freeuk.com> writes:
On 24/06/2024 00:52, Malcolm McLean wrote:
>
43 seconds compile time is getting to be a bit of a problem. But not for
the final build. Only for intermediate builds.
>
That isn't the issue here (it could have been 4.3 seconds vs 1.7 seconds).
>
David Brown was claiming there was little difference (15%, although on
the 34.3s and 30.8s timings, it is actually 11% not 15%) between
optimised and unoptimised builds, whereas I have always seen substantial
differences like 100% or more.
I think the main problem is that Bart doesn't understand what "builds" are. And he doesn't understand the relevance - or irrelevance - of compile times while developing software, and how they relate to /build/ times or /development/ time. I don't care how long it takes to compile a file - I care how long the build takes.
I've been building programs for approaching half a century, and I've been developing tools do so for most of that.
Do you really thing I don't know what a 'build' is?
I can recreate a 13% difference between -O0 and -O2 on one project (not mine), which is 34 files that takes either 22 seconds or 25 seconds.
That is the one where SDL headers are used by most of the modules (where you claim that gcc will build them instantly if only I didn't use Windows). But it has been extablished that processing lots of headers is not affected by optimisation flags.
I noticed that my MCC compiler took 1.8 seconds for a full-build, which for me is annoyingly slow, considering the C code amounts to only 7Kloc.
But because this is C, I switched to incremental compilation, but done manually: setting up a project file for my IDE (instead of compiling *.c), where I can re-compile an individual file then link.
So that is always a possibility, and have used that in the past when my language had independent compilation.
With true whole-program compilation as I normally use, the problem simply wouldn't arise: the library interface, which would also be a short summary not dozens of sprawling headers, is processed once per build.