3 ms·
Kernel has thousands of compilation units. Each of them is compiled by a separate compiler process. Only the linking at the end doesn't parallelise, however it
by enedil 5y ago
Kernel has thousands of compilation units. Each of them is compiled by a separate compiler process. Only the linking at the end doesn't parallelise, however it should take a much smaller part of the time.
The proportions change of course, if you develop kernel and do incremental builds lots of times. Then the linking stage might become a bottleneck.
The above statement should also relate to most other C/C++ projects.
- Too 5y agoKernel is C code though, which doesn’t require as much cpu to compile as say c++. It could be more IO bound. There should be a lot of more legit data available on this than my armchair speculations.
- enedil 5y agoC++ adds a few time-consuming stuff, like templates, however my belief was that what uses the most time is optimization passes, which won't be much faster for C. The actual benchmarks should be done however.