3 ms·
This is often true for SPEC, but not true for real world code. Or at least, we extensively tested this at Google, before, during, and after the move to LLVM.
by DannyBee 4y ago
This is often true for SPEC, but not true for real world code.
Or at least, we extensively tested this at Google, before, during, and after the move to LLVM.
On many thousands of libraries, binaries, etc, made up of hundreds of millions of lines of C++.
While there were wins and losses, on average, LLVM was a consistent net positive.
That was true despite having spent 5+ years of having a large team dedicated to doing nothing but finding places to improve performance of GCC compiled code (and contributing back patches), and doing so very successfully.
That said, as time approaches infinity, the compilers are going to generate the best code for the things that someone took the time to analyze and make the compiler better at.
There is, in the end, no magic that makes GCC better than LLVM or vice versa. The vast majority of it is tuning and improving things little by little for whatever targets someone is trying to improve.
- ncmncm 4y agoI can only go by the results I measure. There certainly are cases where Clang does better than Gcc, but the difference is anyway rarely more than a couple of percent. Occasionally one finds a factor of two one way or the other, e.g. where one compiler has noticed it can use CMOV without penalty.