Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> writes:On 04/12/2024 17:55, Scott Lurndal wrote:Bart <bc@freeuk.com> writes:>On 03/12/2024 14:34, David Brown wrote: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.
Here's a typical build for my project:
$ make -s -j 64
...
COMPILE apc2.cpp
COMPILE bcp2.cpp
BUILD /scratch/lib/libdevice_yyy.so
XXXX_BUILT
BUILDSO /scratch/libxxxx.so.1.0
BUILD TARGET /scratch/bin/xxxx
COMPILE shim.cpp
real 13m48.24s
user 1h2m9.78s
sys 0m56.73s
13 minutes by the wall clock, a bit over an hour
of CPU time.
Is that a "typical" build - or an atypical full clean build?
That was a build that touched a key header file, so maybe
85% full. A full build adds a minute or two wall time.
A single source file build (for most source files) takes
about 28 seconds real, a large portion of that in make as it
figures out what to rebuild in a project with thousands
of source files and associated dependencies.
Les messages affichés proviennent d'usenet.