Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    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.

    Comment


    • #3
      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


      • #4
        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


        • #5
          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.

          Comment


          • #6
            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.

            Comment


            • #7
              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?

              Comment


              • #8
                Intel Bias for LLVM?

                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.

                Comment


                • #9
                  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.?

                  Comment


                  • #10
                    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.

                    Comment

                    Working...
                    X