On 09/08/2011 04:47 AM, Jakub Jelinek wrote:
On Wed, Sep 07, 2011 at 11:15:39AM -0400, Vladimir Makarov wrote:
   This year I used -Ofast -flto -fwhole-program instead of
-O3 for GCC and -O3 -ffast-math for LLVM for comparison of peak
performance.  I could improve GCC performance even more by using
other GCC possibilities (like support of AVX insns, Graphite optimizations
and even some experimental stuff like LIPO) but I wanted to give LLVM
some chances too.  Probably an experienced user in LLVM could improve
LLVM performance too.  So I think it is a fair comparison.
-march=native in addition would be nice to see, that can make significant
difference, especially on AVX capable CPUs.  I guess LLVM equivalent would
be -march=corei7 -mtune=corei7 and, if it works, -mavx too (though, the only
time I've tried LLVM 2.9 it crashed on almost anything with -mavx).

Yes, Jakub. It would be better to use corei7 with avx for GCC. Unfortunately, the last tuning which llvm 2.9 supports is core2 therefore I used -march=core2 for comparison on x86-64. So I think it would be unfair to use corei7 and avx for GCC without using it for LLVM.

I mostly tried to compare state of general optimizations of GCC and LLVM. There are a lot of other aspects of the compilers which we could compare and I did not do it. But for me it is obvious that Apple loses a lot not using modern versions of GCC.


Reply via email to