That's the entire build process, not just the compilation. This means that things in the build (copying files, building archives, linking, etc) get counted as well.
In C, certainly. A short program I wrote took under 1s to compile and about 2s to link.
In C++ this is not the case; compilation is very computationally expensive, with my experiments in Rust leaving me with the feeling that Rust was even more computationally expensive than C++.
As someone who still regularly does C for fun and for profit, I am often left feeling frustrated when trying to compile projects in languages like C++ or Rust.
As an aside, some of the Lisp compilers (SBCL comes to mind) where much faster than one would expect, even though feature-wise it is more or less complete. It's the (I feel) typing and rules checking in complex languages that slows down the compilation, not the linking after everything is compiled.
Comments
That's the entire build process, not just the compilation. This means that things in the build (copying files, building archives, linking, etc) get counted as well.
Linking tends to be the slow part, right?
Especially for rust and c++.
From an iteration speed perspective, you’d want to time the whole build process, not just specially compilation.
In C, certainly. A short program I wrote took under 1s to compile and about 2s to link.
In C++ this is not the case; compilation is very computationally expensive, with my experiments in Rust leaving me with the feeling that Rust was even more computationally expensive than C++.
As someone who still regularly does C for fun and for profit, I am often left feeling frustrated when trying to compile projects in languages like C++ or Rust.
As an aside, some of the Lisp compilers (SBCL comes to mind) where much faster than one would expect, even though feature-wise it is more or less complete. It's the (I feel) typing and rules checking in complex languages that slows down the compilation, not the linking after everything is compiled.
This could speed up linking:
https://github.com/rui314/mold