Page 1 of 2 12 LastLast
Results 1 to 10 of 13

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

  1. #1
    Join Date
    Jan 2007
    Posts
    13,389

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

    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.

    http://www.phoronix.com/vr.php?view=18682

  2. #2
    Join Date
    Sep 2007
    Posts
    239

    Default

    So clang is better tuned for Intel processors. "-march=native" was used, so I'm wondering if it's only a matter of supplying a better set of flags to use for this AMD CPU.

  3. #3
    Join Date
    Dec 2010
    Location
    MA, USA
    Posts
    1,100

    Default

    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.

  4. #4
    Join Date
    Sep 2012
    Posts
    251

    Default

    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 !

  5. #5
    Join Date
    Oct 2010
    Posts
    362

    Default

    Quote Originally Posted by wargames View Post
    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.

  6. #6
    Join Date
    Oct 2012
    Location
    Europe
    Posts
    173

    Default

    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.

  7. #7
    Join Date
    Apr 2012
    Posts
    112

    Default

    Quote Originally Posted by xeekei View Post
    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.
    I agree. I love how much I can get out of my AMD processors with GCC + Gentoo (also OpenMP is more valuable on AMD than Intel, I think).

    Also, every time I read one of these comparisons it's pretty predictable: GCC wins, GCC wins, oh LLVM lost because of lack of OpenMP etc etc

    You'd think they'd classify OpenMP support as high priority?

  8. #8
    Join Date
    Oct 2012
    Location
    Washington State
    Posts
    359

    Default Intel Bias for LLVM?

    Quote Originally Posted by xeekei View Post
    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.

    Truly useless.

  9. #9
    Join Date
    Jul 2011
    Posts
    73

    Default

    Quote Originally Posted by Marc Driftmeyer View Post
    There is no damn bias for Intel CPUs. The bias is in this asinine test harness that is littered with OpenMP.
    I agree: That creates the misconception that OpenMP makes all the difference. Which is not true: In this comparision GCC wins for every single test, often by more than 10%.

    I would much prefer a note which says “LLVM does not support OpenMP, so we did not run any OpenMP tests.”

  10. #10
    Join Date
    Jul 2011
    Posts
    73

    Default

    Quote Originally Posted by Nobu View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •