3 ms·
Great work by the Clang team, well done! I'm a bit surprised to see that build times in Clang are worse, and that resulting binary performance is comparable.
by Ono-Sendai 9y ago
Great work by the Clang team, well done!
I'm a bit surprised to see that build times in Clang are worse, and that resulting binary performance is comparable.
Maybe that will change when the Clang build starts to use LTCG, as the article mentions.
- DannyBee 9y agoYeah, just things that aren't optimized yet. Windows headers, etc have very different hot spots and need different paths to be fast than linux/mac ones. For reference, in distributed builds, the build times are ridiculously faster using clang. (it shaves many hours off the time).
- tmzt 9y agoIs that due to the use of PCH in MSVC, so the hotspots only happen if the headers change? What does clang offer in this regard? Is incremental build sufficient?
- DannyBee 9y agoNo, clang offers precompiled headers as well. It's literally things like "parsing large numbers of pragmas is slower in clang because nobody has bothered to optimize it". This is not uncommon for very different codebases. Clang was, for a long time, many times slower at compiling the linux kernel, for example, because the linux kernel headers have a huge amount of inline assembly and nobody ever bothered to optimize the parsing paths for inline assembly. (now somewhat fixed). This is just the very typical "hey, when you change the use cases dramatically, you may need to retune/rethink how certain things are done" I think people just may not realize how wildly different these types of codebases are in what types of statements/things occur.