[1] https://www.npopov.com/2020/05/10/Make-LLVM-fast-again.html
[1] https://www.npopov.com/2020/05/10/Make-LLVM-fast-again.html
From the article:
I think this is the first time in quite a few releases where we end up with an overall regression. However, the situation is not quite as bad as it looks.
In particular, the large regression on the right is due to enabling C++17 by default. The close to two times slowdown in 7zip O0 builds comes down to STL headers becoming 2-3 times as large in C++17.
While this is sad, and I had to edit out some choice words on the C++ standardization committee (I hear that this gets even worse in C++20), at least this does not affect non-clang compilers (e.g. Rust) and C code.
Clang might have become slower over time, but it still has a long way to go until it gets down to MSVC's average performance.
In this particular case though, no it does not seem it matters, as the slowdown is related to C++ headers in the newer standard lib, not to the low-level compilation.
"One of the most common mistakes made by new language frontend projects is to use the existing -O2 or -O3 pass pipelines as is. These pass pipelines make a good starting point for an optimizing compiler for any language, but they have been carefully tuned for C and C++, not your target language. You will almost certainly need to use a custom pass order to achieve optimal performance."
The tl;dr is that check builds are faster (i.e. optimization quality has improved) while debug/opt builds are mixed, but slightly slower when averaged over everything.
gcc-11.2 -O0 0.02
clang-12.0.1 -O0 0.04
tcc 0.002
I wish TCC was still being maintained and supported by modern toolchains.... which says at the top:
Note: I am no longer working on TCC. Check the mailing list to get up to date information.
So, sounds pretty dead. But actually following the suggestion and taking a look at the mailing list helps:https://lists.nongnu.org/archive/html/tinycc-devel/2023-03/t...
And the source code repo seems pretty active: