Travis Boucher:
> Although it's design 
> promotes all sorta of optimization techniques, its still pretty young 
> (compared to gcc) and just doesn't have all of the optimization stuff 
> gcc has.

I have already done hundred of tests and benchmarks with LDC and llvm-gcc, and 
I'm starting to understand its optimizations. I am mostly ignorant of LLVM 
still, but I'm giving a bit of help tuning it, this improvement was motivated 
by me:
http://blog.llvm.org/2009/12/advanced-topics-in-redundant-load.html

Compared to GCC LLVM lacks vectorization (this can be important for certain 
heavy numerical computing code), profile-guided optimization (this is usually 
less important, it's uncommon that it gives more than 5-25% performance 
improvement), but it has a link-time optimizations that gcc lacks (about as 
important as profile-guided optimization or a little more).

LLVM produces bad X86 floating point code still, but its int/FP SSE code is 
about as good as GCC one or better (but it's not vectorized, so far).

GCC is older and it knows few extra small/tiny optimization tricks, but in most 
situations they don't create a large difference in performance, they are often 
quite specific.

So overall LLVM may sometime produce a little slower code, but in many 
situations it's about as good or even better (I can show a large amount of 
cases where LLVM is better). So the asm quality difference is smaller than you 
seem to imply. If the size of such performance differences are important for 
you, then you may want to use the Intel compiler instead of GCC, because it's 
sometimes better than GCC.

Bye,
bearophile

Reply via email to