My results are indeed using
time ninja after
ninja clean. The build includes all packages in complete standard config (
cmake -G Ninja .. with all prerequisites and all submodules installed).
To me this seems much in line with expectations. Theoretically 32 threads could do the job 8 times faster or on a little over 10 seconds. But, you are already not getting full resource usage (220/4 = 55 sec) with 4 threads. Using more threads this gets worse as some parts of the build need to be done before anything else and others after (almost) all other tasks. Hyperthreads are slower than the real thing, so the 32 core is (very rough estimate as the efficiency of hyperthreading depends a lot on the workload) probably more like 24. I’d also be surprised if I/O and memory are not getting bottlenecks. Compilation is very I/O intensive.
Modern CPUs don’t seem to differ that much. The AMD 3950X runs my Prolog single threaded benchmark about 25% faster than the old Intel i7-3770 (4 cores, 8 threads). That almost 8 year old machine took 95 sec, although that was only on the second run. The first run was more like 2 min as the disk was really slow. M2 SSD could have saved the machine, but don’t fit in the old motherboard, so end up with a long chain of outdated components that needs updating and 8 years seems close to end-of-life.
The biggest CPU improvement is from 4 to 16 cores with a rise of TPD from 77 to 105W.
I wonder how power usage in idle state compares.
With DataChemist’s contribution I should be fine for another 8 years