Liste des Groupes | Revenir à cl c |
On 03/12/2024 21:51, Bart wrote:I don't know why you are bothering with this. Most of the compilers you use here are useless for actual work, and the timings for them are therefore irrelevant. Your nonsense collection of random files with meaningless choices of "static" or "non-static" is in no way representative of anything.On 03/12/2024 14:34, David Brown wrote:The timing from one was about 9 seconds when it was generating 200 .obj files, before I tweaked things to allow an EXE to be created (by using 'static' in each file to avoid clashes).On 02/12/2024 22:53, Bart wrote:>For the project-specific code, rather than libraries, SDK, etc.:>
>
-----------------------------------------------------------------------
Language files blank comment code
-----------------------------------------------------------------------
C++ 39 2217 1020 11820
C/C++ Header 44 1078 798 2696
C 3 259 237 1152
-----------------------------------------------------------------------
SUM: 86 3554 2055 15668
------------------------------------------------------------------------
>Not that it really matters, but a typical build for my project takes about 1 to 3 seconds.>
I don't really know what they means, because I don't know is involved, and what is being missed out.
>
So, to get an idea of how long gcc really takes (or would take on my machine), I set up a comparable test. I took an 800-line C program, and duplicated it in 200 separate files f1.c to f200.c, for a total line count of 167Kloc.
>
gcc took 30 to 90 seconds to create an EXE using -O0 and -O2.
>
Under WSL, it took 18 to 54 seconds 'real time' (to .o files; it can't link due to Win32 imports).
>
Tiny C took 0.64 seconds.
>
My two C compilers were rubbish so I won't report those timings (the newer one only works a file at a time anyway so needs invoking 200 times).
If I also include my original compiler when I strived to make multiple files more efficient, then timings on Windows are:
mm 0.53 seconds (Non-C test inputs)
tcc 0.64 seconds
bcc 1 second
mcc 3 seconds
cc 5 seconds (to produce 200 .obj files)
gcc 32 seconds (-O0, v.14.1; the WSL timing was for 9.4)
The original 93 seconds for gcc-O2 was for a test using non-static functions and generating 200 .o files. I reran it for EXE using -O0 but not with -O2.
If I do so now, gcc-O2 takes 18 seconds, but it produces a too-small EXE file. Presumably it is largely discarding the 199 modules that comprise only static functions.
So that timing is erroneous.
Les messages affichés proviennent d'usenet.