Hacker News new | ask | show | jobs
by pjmlp 2522 days ago
Only when incremental compiler, incremental linking and pre-compiled headers are disabled.
1 comments

It's not just the compiler but also the system SDKs that play a significant role in the compile times.

In an apples-to-apples comparison (ie: same pre-processed code content) from circa 2015, Visual Studio's compilation was about the same speed as clang and faster than GCC, without the use of incremental compilation / incremental linking / PCH.

It's very easy to dig yourself into a hole when developing for Windows because Microsoft has historically had terrible discipline for minimizing the amount of code brought in through the Windows platform includes as well as the language headers. PCH's ease the penalty significantly but are a bitter pill to swallow if you're trying to cut down on the number of symbols exposed to each translation unit.

Kind of true, but the common use of distributing binaries means that one can also take care to modularize the application across lib, DLL or COM modules, thus reducing even more what actually gets compiled from scratch.

Naturally one can do that across UNIXes as well, they just historically seem not to have invested that much either in incremental linking nor in a proper pre-compiled header model, hence no one really uses them. At least that is my perception.

In any case modules are in now, so lets see how they evolve.