3 ms·
I've been using clang 2.7 instead of GCC for a few months now. I'm never going back to GCC: * It has much better diagnostics messages: http://clang.llvm.org/di
by avar 16y ago
I've been using clang 2.7 instead of GCC for a few months now. I'm never going back to GCC:
* It has much better diagnostics messages: http://clang.llvm.org/diagnostics.html http://clang.llvm.org/diagnostics.html
* Compilation times are much faster, even though I always wrap gcc/clang with ccache.
* It uses a lot less CPU / memory on equivalent compile options.
The only disadvantage is that compared to GCC 4.4 the resulting binaries are usually around 5-10% slower. The LLVM developers say that's to be expected, currently they're targeting GCC 4.2 for their performance metrics.
- jules 16y agoWhy is GCC better? It's probably not that easy to answer, but does GCC have a better register allocator? Better IL optimizations? Better code generation?
- saurik 16y agoThis seems like an argument to use LLVM for day-to-day development and gcc for later staging and deployment, not to ditch gcc entirely for LLVM.
- avar 16y agoRight, I should have mentioned that I only do C development, not packaging. So I compile everything with CFLAGS="-O0 -ggdb3". But of course if you're producing binary packages you may want to use other criteria than compilation speed and diagnostic messages to select the compiler.