Re: Baby X is bor nagain

Liste des GroupesRevenir à cl c 
Sujet : Re: Baby X is bor nagain
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.c
Date : 24. Jun 2024, 19:41:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240624204131.000029bd@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Mon, 24 Jun 2024 17:51:25 +0100
bart <bc@freeuk.com> wrote:

On 24/06/2024 16:10, Michael S wrote:
On Mon, 24 Jun 2024 15:00:26 +0100
bart <bc@freeuk.com> wrote: 
 
 
Your processor has a CPU-mark double that of mine, which has only
two cores, and is using one.
>
Building a 34-module project with .text size of 300KB, with either
gcc 10 or 14, using -O0, takes about 8 seconds, or 37KB/second.
 
 
But my project has much more than 34 modules. 164 modules compiled
during build + several dozens in libraries. 
 
Does that matter? My example is a smaller project, but I'm comparing
the rate of compilation not total time.
 
If you want a bigger example, yesterday I posted one involving 140 .c
files, total EXE size is 5MB (don't know .text as this is ELF format).
 
-O2 took just over twice as long as -O0.
 
But I guess every single example I come up with is 'exceptional'.
Maybe what's exceptional is that I measuring the runtime of the
compiler, and not all sorts of other junk.
 
You might claim that that other junk is necessary for the the build;
I'd dispute that.
>

Here is compile time only, serial. It is only few seconds faster than
non-parallel make:
-O0 0m21.761s
-Os 0m24.227s
-O1 0m23.384s
-O2 0m24.601s
-O3 0m25.256s
O2/O0= 1.13

It could be probably up to 1.5x faster if I call compiler with more
than one source file at time, but then it would be too different from
our normal workflow.

Here are 3 biggest modules (Option/time(second)/text sise):
module 0:

module A
-O0 0.250 58444
-Os 0.530 29760
-O1 0.390 37368
-O2 0.530 34128
-O3 0.671 50104

module B
-O0 0.250 32680
-Os 0.343 25840
-O1 0.296 26452
-O2 0.343 26992
-O3 0.343 27672

Module C
-O0 0.296 37648
-Os 0.437 25976
-O1 0.390 28168
-O2 0.468 27784
-O3 0.515 32556

The biggest module (module A), absolutely not co-incidentally was not
written by us. It is purchased from Jean Labrosse, who is smart guy and
good businessman, but his ideas of software engineering are best
described as eccentric.
Other big modules are dispatchers: they receive messages from command
line/telnet (Module 2) and HTTP (module 3) and either handle simple
cases by themselves or in more typical and more complex cases call
outside modules to do the job. So while they are big, they consist of
big number of independent pieces. As you see, this sort of bigness does
not produce particularly big -O2/-O0 ratios.

Your figures show about 50KB/second. 
 
text KB/second is hardly a good measure, esp. considering that we
are talking about different architectures. Mine is Altera Nios2 -
32-bit RISC processor very similar to MIPS. The code density for
this architecture is significantly lower than on ARMv7 or x386 and
even somewhat lower than x86-64 and ARM64. The exact ratio depends
on the project, but 15-20% would be typical.
Also, part of text are libraries that we not compiled during this
build. But I would think that your .text size also includes
libraries. 
 
So, what is the total size of the code that is produced by the
compilation?

I don't know. Probably 70-80% of total text

What is the data size?
>

Initialized data and read-only data? Not big. 23 KB. bss is
significantly bigger (2.8 MB), but I don't see how size of bss is
possibly relevant.


I really don't believe it. And you should understand that it
doesn't add up.
 
 
I am not lying. 
 
I'm not saying that. I'm disputing that -O2 adds only 10% compared to
-O0 when running only gcc.
 
  I am pretty sure that DavidB also tells truth.
I recommend to try to compile your C compiler with gcc. 
 
My C compiler is not written in C. I can transpile to C, but then it
would be a single large C file, which puts pressure on the optimiser:
 

One big file is not quite obviously special case.

   C:\cx>mc -c cc              # transpile to C 
   Compiling cc.m to cc.c
 
   C:\cx>tm gcc cc.c           # -O0 build 
   TM: 1.92
 
   C:\cx>tm gcc cc.c -O2 
   TM: 9.22
 
It takes 380% longer compared with -O0. However the advantage is that
I now have a whole-program optimised application. But this is not
something I need to do routinely (maybe on production versions or
running benchmarks).
 
Most of the time I don't need the optimised code (which is only about
40% faster) and can build like this:
 
   C:\cx>tm mm cc 
   Compiling cc.m to cc.exe
   TM: 0.06
 
(If mm.exe is similarly boosted by via gcc, otherwise it takes 0.08s.)
 
So optimisation for this product take 150 times, or 15,000%, longer.
 
DB was however saying that he normally has optimisation turned on.
Well I'm not surprised if turning it off makes only 11% difference!
But he is not interested in super-fast builds such as those I work on.
 
Note that that 0.06 figure is for rebuilding my C compiler from
scratch (200KB .text size, 300KB EXE size.), and 1/3 of it is Windows
process overheads. Accurately measuring build-times when timings are
near zero is difficult.
 
 



Date Sujet#  Auteur
11 Jun 24 * Baby X is bor nagain322Malcolm McLean
11 Jun 24 +* Re: Baby X is bor nagain3bart
11 Jun 24 i`* Re: Baby X is bor nagain2Malcolm McLean
12 Jun 24 i `- Mac users (Was: Baby X is bor nagain)1Kenny McCormack
11 Jun 24 +* Re: Baby X is bor nagain4Ben Bacarisse
11 Jun 24 i`* Re: Baby X is bor nagain3Malcolm McLean
12 Jun 24 i `* Re: Baby X is bor nagain2Ben Bacarisse
12 Jun 24 i  `- Re: Baby X is bor nagain1Malcolm McLean
11 Jun 24 +* Re: Baby X is bor nagain313Bonita Montero
11 Jun 24 i+* Re: Baby X is bor nagain309Malcolm McLean
12 Jun 24 ii`* Re: Baby X is bor nagain308Bonita Montero
12 Jun 24 ii +* Re: Baby X is bor nagain305David Brown
12 Jun 24 ii i+* Re: Baby X is bor nagain2Malcolm McLean
12 Jun 24 ii ii`- Re: Baby X is bor nagain1David Brown
12 Jun 24 ii i+- Re: Baby X is bor nagain1Bonita Montero
12 Jun 24 ii i`* Re: Baby X is bor nagain301bart
12 Jun 24 ii i +* Re: Baby X is bor nagain4Bonita Montero
12 Jun 24 ii i i`* Re: Baby X is bor nagain3bart
12 Jun 24 ii i i `* Re: Baby X is bor nagain2Bonita Montero
12 Jun 24 ii i i  `- Re: Baby X is bor nagain1bart
12 Jun 24 ii i `* Re: Baby X is bor nagain296David Brown
12 Jun 24 ii i  `* Re: Baby X is bor nagain295Michael S
13 Jun 24 ii i   +- Re: Baby X is bor nagain1Malcolm McLean
13 Jun 24 ii i   `* Re: Baby X is bor nagain293David Brown
13 Jun 24 ii i    +* Re: Baby X is bor nagain5bart
13 Jun 24 ii i    i+* Re: Baby X is bor nagain3tTh
13 Jun 24 ii i    ii`* Re: Baby X is bor nagain2bart
14 Jun 24 ii i    ii `- Re: Baby X is bor nagain1Bonita Montero
13 Jun 24 ii i    i`- Re: Baby X is bor nagain1Michael S
13 Jun 24 ii i    `* Re: Baby X is bor nagain287Michael S
14 Jun 24 ii i     +* Re: Baby X is bor nagain3David Brown
14 Jun 24 ii i     i`* Re: Baby X is bor nagain2bart
15 Jun 24 ii i     i `- Re: Baby X is bor nagain1David Brown
17 Jun 24 ii i     `* Re: Baby X is bor nagain283James Kuyper
17 Jun 24 ii i      +* Re: Baby X is bor nagain86Kaz Kylheku
17 Jun 24 ii i      i+- Are Javascript and Python similarly slow ? (Was: Baby X is bor nagain)1Michael S
17 Jun 24 ii i      i+* Re: Baby X is bor nagain2Michael S
18 Jun 24 ii i      ii`- Re: Baby X is bor nagain1Tim Rentsch
17 Jun 24 ii i      i+* Re: Baby X is bor nagain80David Brown
18 Jun 24 ii i      ii`* Re: Baby X is bor nagain79Michael S
18 Jun 24 ii i      ii `* Re: Baby X is bor nagain78David Brown
18 Jun 24 ii i      ii  +* Re: Baby X is bor nagain7bart
18 Jun 24 ii i      ii  i`* Re: Baby X is bor nagain6David Brown
18 Jun 24 ii i      ii  i +* Re: Baby X is bor nagain2bart
18 Jun 24 ii i      ii  i i`- Re: Baby X is bor nagain1David Brown
18 Jun 24 ii i      ii  i `* Re: Baby X is bor nagain3DFS
18 Jun 24 ii i      ii  i  `* Re: Baby X is bor nagain2Mark Bourne
18 Jun 24 ii i      ii  i   `- Re: Baby X is bor nagain1DFS
18 Jun 24 ii i      ii  +* Re: Baby X is bor nagain3Malcolm McLean
18 Jun 24 ii i      ii  i+- Re: Baby X is bor nagain1David Brown
18 Jun 24 ii i      ii  i`- Re: Baby X is bor nagain1Mark Bourne
18 Jun 24 ii i      ii  `* Re: Baby X is bor nagain67Michael S
18 Jun 24 ii i      ii   +* Re: Baby X is bor nagain65Malcolm McLean
19 Jun 24 ii i      ii   i+* Re: Baby X is bor nagain59Keith Thompson
19 Jun 24 ii i      ii   ii`* Re: Baby X is bor nagain58Malcolm McLean
19 Jun 24 ii i      ii   ii +* Re: Baby X is bor nagain56David Brown
19 Jun 24 ii i      ii   ii i`* Re: Baby X is bor nagain55Malcolm McLean
19 Jun 24 ii i      ii   ii i `* Re: Baby X is bor nagain54David Brown
19 Jun 24 ii i      ii   ii i  `* Re: Baby X is bor nagain53Malcolm McLean
19 Jun 24 ii i      ii   ii i   +* Re: Baby X is bor nagain10bart
20 Jun 24 ii i      ii   ii i   i`* Re: Baby X is bor nagain9David Brown
20 Jun 24 ii i      ii   ii i   i `* Re: Baby X is bor nagain8bart
20 Jun 24 ii i      ii   ii i   i  `* Re: Baby X is bor nagain7David Brown
20 Jun 24 ii i      ii   ii i   i   `* Re: Baby X is bor nagain6bart
20 Jun 24 ii i      ii   ii i   i    +* Re: Baby X is bor nagain2Michael S
20 Jun 24 ii i      ii   ii i   i    i`- Re: Baby X is bor nagain1bart
20 Jun 24 ii i      ii   ii i   i    `* Re: Baby X is bor nagain3David Brown
21 Jun 24 ii i      ii   ii i   i     `* Re: Baby X is bor nagain2bart
21 Jun 24 ii i      ii   ii i   i      `- Re: Baby X is bor nagain1David Brown
20 Jun 24 ii i      ii   ii i   `* Re: Baby X is bor nagain42David Brown
20 Jun 24 ii i      ii   ii i    `* Re: Baby X is bor nagain41Malcolm McLean
20 Jun 24 ii i      ii   ii i     +- Re: Baby X is bor nagain1David Brown
20 Jun 24 ii i      ii   ii i     `* Re: Baby X is bor nagain39Ben Bacarisse
20 Jun 24 ii i      ii   ii i      +* Re: Baby X is bor nagain2Malcolm McLean
20 Jun 24 ii i      ii   ii i      i`- Re: Baby X is bor nagain1Ben Bacarisse
20 Jun 24 ii i      ii   ii i      +* Re: Baby X is bor nagain9Tim Rentsch
20 Jun 24 ii i      ii   ii i      i`* Re: Baby X is bor nagain8Malcolm McLean
20 Jun 24 ii i      ii   ii i      i +* Re: Baby X is bor nagain2James Kuyper
20 Jun 24 ii i      ii   ii i      i i`- Re: Baby X is bor nagain1Keith Thompson
20 Jun 24 ii i      ii   ii i      i +- Re: Baby X is bor nagain1Vir Campestris
20 Jun 24 ii i      ii   ii i      i +* Re: Baby X is bor nagain2Keith Thompson
21 Jun 24 ii i      ii   ii i      i i`- Re: Baby X is bor nagain1vallor
21 Jun 24 ii i      ii   ii i      i +- Re: Baby X is bor nagain1Tim Rentsch
21 Jun 24 ii i      ii   ii i      i `- Re: Baby X is bor nagain1David Brown
20 Jun 24 ii i      ii   ii i      `* Re: Baby X is bor nagain27Keith Thompson
20 Jun 24 ii i      ii   ii i       `* Re: Baby X is bor nagain26Ben Bacarisse
20 Jun 24 ii i      ii   ii i        +* Re: Baby X is bor nagain2Michael S
21 Jun 24 ii i      ii   ii i        i`- Re: Baby X is bor nagain1Ben Bacarisse
20 Jun 24 ii i      ii   ii i        +- Re: Baby X is bor nagain1Keith Thompson
21 Jun 24 ii i      ii   ii i        +* Re: Baby X is bor nagain2James Kuyper
21 Jun 24 ii i      ii   ii i        i`- Re: Baby X is bor nagain1Keith Thompson
22 Jun 24 ii i      ii   ii i        `* Re: Baby X is bor nagain20Tim Rentsch
23 Jun 24 ii i      ii   ii i         `* Re: Baby X is bor nagain19Ben Bacarisse
23 Jun 24 ii i      ii   ii i          +* Re: Baby X is bor nagain9James Kuyper
23 Jun 24 ii i      ii   ii i          i`* Re: Baby X is bor nagain8Tim Rentsch
24 Jun 24 ii i      ii   ii i          i +* Re: Baby X is bor nagain4Ben Bacarisse
24 Jun 24 ii i      ii   ii i          i i`* Re: Baby X is bor nagain3Tim Rentsch
25 Jun 24 ii i      ii   ii i          i i `* Re: Baby X is bor nagain2Ben Bacarisse
25 Jun 24 ii i      ii   ii i          i i  `- Re: Baby X is bor nagain1Tim Rentsch
24 Jun 24 ii i      ii   ii i          i `* Re: Baby X is bor nagain3Keith Thompson
24 Jun 24 ii i      ii   ii i          i  `* Re: Baby X is bor nagain2Tim Rentsch
23 Jun 24 ii i      ii   ii i          `* Re: Baby X is bor nagain9Tim Rentsch
19 Jun 24 ii i      ii   ii `- Re: Baby X is bor nagain1Keith Thompson
19 Jun 24 ii i      ii   i`* Re: Baby X is bor nagain5David Brown
19 Jun 24 ii i      ii   `- Re: Baby X is bor nagain1David Brown
18 Jun 24 ii i      i+- Re: Baby X is bor nagain1James Kuyper
20 Jun 24 ii i      i`- Re: Baby X is bor nagain1Vir Campestris
17 Jun 24 ii i      +* Re: Baby X is bor nagain193bart
17 Jun 24 ii i      `* Re: Baby X is bor nagain3Malcolm McLean
12 Jun 24 ii `* Topicality is not your strong suit (Was: Baby X is bor nagain)2Kenny McCormack
11 Jun 24 i`* Re: Baby X is bor nagain3bart
11 Jun 24 `- Re: Baby X is bor nagain1Kalevi Kolttonen

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal