4 ms·
People choose CLANG mainly because of its license. But GCC still produces faster binaries.
by sprash 9y ago
People choose CLANG mainly because of its license. But GCC still produces faster binaries.
- DominikD 9y agoNot really, this depends on the code being compiled/run, e.g.: http://www.phoronix.com/scan.php?page=article&item=gcc7-clang4-jan&num=2 http://www.phoronix.com/scan.php?page=article&item=gcc7-clan... GCC however has many more platforms supported, so in certain use cases LLVM is out of the question entirely. That being said: for OS development (and many other projects) predictable and correct is more important than fast. Optimizations that lead to these performance gains are oftentimes harmful given that code is typically far from perfect.
- floatboth 9y ago(what's with the CAPSLOCK, it's lowercase clang) Such blanket statements are not useful. Actually different compilers win on different benchmarks. Look at any test e.g. https://www.phoronix.com/scan.php?page=article&item=gcc8-clang5-znver1&num=2 https://www.phoronix.com/scan.php?page=article&item=gcc8-cla... — GCC is faster for FFTs, clang is faster for matrix factorization, … they trade blows basically.