Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v5aee8$irp6$1@dont-email.me>
Deutsch   English   Français   Italiano  
<v5aee8$irp6$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: Baby X is bor nagain
Date: Mon, 24 Jun 2024 01:25:46 +0100
Organization: A noiseless patient Spider
Lines: 91
Message-ID: <v5aee8$irp6$1@dont-email.me>
References: <v494f9$von8$1@dont-email.me>
 <v49seg$14cva$1@raubtier-asyl.eternal-september.org>
 <v49t6f$14i1o$1@dont-email.me>
 <v4bcbj$1gqlo$1@raubtier-asyl.eternal-september.org>
 <v4bh56$1hibd$1@dont-email.me> <v4c0mg$1kjmk$1@dont-email.me>
 <v4c8s4$1lki1$4@dont-email.me> <20240613002933.000075c5@yahoo.com>
 <v4emki$28d1b$1@dont-email.me> <20240613174354.00005498@yahoo.com>
 <v4okn9$flpo$2@dont-email.me> <v4p37r$k32n$1@dont-email.me>
 <v4pei3$m5th$2@dont-email.me> <v4plsk$nn9o$2@dont-email.me>
 <v4pnq6$o4fs$1@dont-email.me> <v4q245$si2n$1@dont-email.me>
 <v4q2rl$sqk3$1@dont-email.me> <v52308$2nli8$3@dont-email.me>
 <v53i4s$33k73$2@dont-email.me> <v53lf7$34huc$1@dont-email.me>
 <v53vh6$368vf$1@dont-email.me> <v54se1$3bqsk$1@dont-email.me>
 <v5948h$bale$1@dont-email.me> <v59p2j$eodu$1@dont-email.me>
 <v5a2tk$gouo$1@dont-email.me> <v5acfs$imuh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 24 Jun 2024 02:25:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b9ae78d5a8a2c8822d3975b378ef6e69";
	logging-data="618278"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/rixgMHblrT7EspTFDQb+2"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IhlURwm8hBvLREbVsuXxny/F8pg=
In-Reply-To: <v5acfs$imuh$1@dont-email.me>
Content-Language: en-GB
Bytes: 5513

On 24/06/2024 00:52, Malcolm McLean wrote:
> On 23/06/2024 22:09, bart wrote:
>> On 23/06/2024 19:21, bart wrote:
>>> On 23/06/2024 13:25, David Brown wrote:
>>
>>>> In my experience, programs don't usually consist of a single C file. 
>>>> And if they do, build time is rarely long enough to worry anyone.
>>>>
>>>> I think, from the history of discussions in this group, that it is 
>>>> more likely that your codebases are the peculiar ones.
>>>
>>>
>>> I specifically excluded any of my own. I tried a variety of distinct 
>>> projects, all sharing the same characteristics: that -O3 generally 
>>> doubled build time, sometimes a bit less, often a lot more.
>>>
>>> But you seem remarkably unbothered that in your code-base, the 
>>> difference is only 15% [for -O2]. I'd be quite curious.
>>>
>>> If that really was typical, and I was in charge of gcc, I'd seriously 
>>> consider whether to bother with the -O0 and -O1 levels.
>>>
>>> However the following timings to build TCC/lUA are typical of my 
>>> experience of gcc over 10-20 years:
>>>
>>>     (tcc  0.10)
>>>     -O0   2.84 seconds to build tcc.exe
>>>     -O1   5.70
>>>     -O2  10.78
>>>     -O3  13.21
>>>
>>>     (tcc  0.25)
>>>     -O0   7.74 seconds to build lua.exe
>>>     -O1  10.63
>>>     -O2  14.95
>>>     -O3  18.24
>>>
>>> I've shown the timings from building with Tcc to give some 
>>> perspective. The proportional difference between -O3 and -O0 is 
>>> indeed small compared with that between -O0 and tcc!
>>
>> I've done one more test, which is compiling 140 .c files of Seed7 to 
>> object files (not linking). This was done under WSL and outside of a 
>> makefile where there were a million things going on that I had no idea 
>> about.
>>
>> Results were:
>>
>>    -O0   17 seconds
>>    -O2   36 seconds
>>    -O3   43 seconds
>>
>> This was done with one invocation of gcc. Invoking gcc each time might 
>> well make it slower, but a test I did along those lines was not 
>> conclusive.
>>
>> So, if the difference between O0 and O2 is so narrow for you, and it's 
>> not the source code, nor how you invoke gcc, then there must be other 
>> things going on.
>>
>>
> 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.

He suggested that my figures (based on working with myriad open source 
programs as well as my own) were erroneous, and that his figures must be 
correct. But he also claims that gcc compiles the SDL headers 15 times 
faster, on his old machine with HDD, than it makes on my newer machine 
with SSD, and that the main reasons is because it runs Windows.

He further claims that WSL isn't Linux (because I got the same behaviour 
on that). But I have also seen those differences with gcc running on 
pure Linux machines with no Windows at all.

I think he's just trying to win some stupid argument (something to do 
with gcc not really being that slow compiler, or if it is, there's a way 
around it: don't compile any files!).

My own theory is that of those 30.8/34.3s -O0/-O2 timings to build that 
project of his, ~27 seconds of it was nothing to do with gcc but 
something else his build system ws up to. But he isn't interested in 
invesigating further (no surprise).