Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:So what was that -j96 about?On 28/03/2025 16:13, Scott Lurndal wrote:The gnu compiler is not multithreaded. The single thread wasTim Rentsch <tr.17687@z991.linuxsc.com> writes:>scott@slp53.sl.home (Scott Lurndal) writes:>
>[...] I have one>
source file that takes almost 7 minutes to compile
when using -O3 on a very-high-end xeon box. Mostly
buried in the overall compile time when using parallel
make.
>
The code could be restructured to compile in a few seconds;
but that would require substantial changes to the rest
of the codebase. Compiling with -O0 for development
testing reduces the compile time to a few seconds.
How long does it take compiling with -O1?
Using -O1 saves 14 seconds on the long-pole.
>
>
$ time mr -s -j96
COMPILE g.cpp
BUILD lib/lib_g.so
BUILDSO libsim.so.1.0
BUILD TARGET sim
>
real 14m0.76s
user 13m52.28s
sys 0m20.13s
>
$ time md -s -j96
COMPILE g.cpp
BUILD lib_g.so
BUILDSO libsim.so.1.0
BUILD TARGET sim
>
real 13m46.49s
user 13m42.17s
sys 0m16.66s
>
To be clear, we know that this is ridiculous, the generated
header file totals 1.25 million lines, including a single
function with over 200,000 SLOC. Feature creep, antique
algorithms, screwed up third-party ip-xact collateral and
tight development schedules.
So, 13:40 minutes for 1.25M lines? (I assume that header contains code
not just declarations.)
>
That would make it 1.5Kloc/second, but it also apparently over 96 cores
(or threads)? That comes to 16 lines per second per thread.
compute bound for 13 minutes and 46 seconds.
I thought I explained. Compile-time for a long function can increase non-linearly in a complex compiler. It could also use up more memory than the same line-count but split into separate functions.>Why?
That 200K lines in one function looks suspicious
Les messages affichés proviennent d'usenet.