If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

GCC vs. LLVM/Clang On AMD's FX-8350 Vishera

04-27-2013, 10:00 AM

Phoronix: GCC vs. LLVM/Clang On AMD's FX-8350 Vishera

Most often when delivering new compiler benchmarks on Phoronix whether it be for GCC, LLVM/Clang, or an alternative Linux code compiler, the testing is most commonly done with Intel hardware. The Intel compiler testing is done since Intel CPUs are predominantly used in the developer world and we happen to have a lot more Intel hardware samples around than AMD CPUs. However, for those curious how the LLVM/Clang 3.3 performance is stacking up, here are some GCC and LLVM/Clang benchmarks from an AMD FX-8350 "Vishera" system running Ubuntu 13.04 Linux.

Comment

I'm seriously considering getting an FX-6300 since it seems to be the best valued desktop AMD processor that isn't an APU, and it's likely the last CPU upgrade I can make to my current mobo, assuming it'll even support it (I'm using a beta bios that supports bulldozer but mentions nothing about piledriver). The thing is, my current CPU (Athlon II x3 at 3.75GHz) doesn't seem to ever max out in tasks where I need realtime performance, such as games, but, it's relatively slow when it comes to anything else such as compiling or compressing an archive - my SSD is waiting most of the time during compression. I don't seriously mind the wait, but it's hard to justify the upgrade.

Comment

So... basically GCC is much faster than LLVM/Clang in everything but compilation times ? Where are you Apple fanboys ? Of course they will say Clang is slower because it does not use OpenMP. Oh wait ! They don't want to use OpenMP because it doesn't scale to a million of threads !

Comment

So... basically GCC is much faster than LLVM/Clang in everything but compilation times ? Where are you Apple fanboys ? Of course they will say Clang is slower because it does not use OpenMP. Oh wait ! They don't want to use OpenMP because it doesn't scale to a million of threads !

Or, GCC is much faster in anything which uses OpenMP, and moderately faster or equal in anything (except compile times) which doesn't?

Besides, it's not the fanboys who don't want to use OpenMP, but the developers of LLVM/Clang. I mean, maybe some fanboys don't want them to use OpenMP, but in the end it is not they who decide.

Comment

The only fear I really have of LLVM is the possible bias towards Intel CPUs. With Apple sponsoring it, and they only use Intel in their Macs, it is a huge possibility.

There is no damn bias for Intel CPUs. The bias is in this asinine test harness that is littered with OpenMP. Seeing how OpenMP 4 is targeted for LLVM, in a manner allowing several competing techs with OpenMP to be first class citizens, only then can I understand running such tests against competing Compiler Suites.

How about we run OpenCL tests between GCC/LLVM and see how the R600 works with AMD GPGPUs? I'd imagine that's a bit more complicated to set up, right?

Until I see a level playing field of tests where all compiler suites enter with the same capabilties [includes OpenMP support] the use of these exercises serves zero purpose other than to remind one of Golf where you enter with a different handicap.

Comment

Or, GCC is much faster in anything which uses OpenMP, and moderately faster or equal in anything (except compile times) which doesn't?

Yepp. That’s what I wished to have seen in the conclusion. The current conclusion is not only misleading but simply wrong:

The performance of LLVM/Clang 3.3 for most tests is at least comparable to GCC

It is not “at least” comparable. If I take out the OpenMP tests, LLVM is slower by

- 10.2%
- 12.7%
- 6.8%
- 9.1%
- 42.2%

Actually in 3 out of 5 tests, GCC was more than 10% faster than LLVM!

when ignoring the OpenMP-based application results.

So why are they in there?

In a few benchmarks LLVM/Clang is faster, particularly when it comes to build times.

That’s not “particularly”. LLVM is faster ONLY when it comes to build times!

So a conclusion which tries to represent the tests should rather say something like this:

The performance of LLVM/Clang 3.3 is significantly worse than the performance of GCC. When ignoring the OpenMP-based application results (since OpenMP is not supported in LLVM) the difference is bigger than 10% in 3 out of 5 tests. LLVM/Clang only wins in the comparisions which test build times. Overall GCC is faster with the generated application binary performance on the AMD FX-8350 "Bulldozer 2" setup running Ubuntu Linux.