Announcement

Collapse
No announcement yet.

LLVM Clang 3.7 vs. GCC Compiler Benchmarks On Linux

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

  • LLVM Clang 3.7 vs. GCC Compiler Benchmarks On Linux

    Phoronix: LLVM Clang 3.7 vs. GCC Compiler Benchmarks On Linux

    With the official release of LLVM 3.7 being imminent, here are some fresh compiler benchmarks comparing its performance on Linux x86_64 to that of LLVM Clang 3.6 as well as GCC 4.9 and GCC 5.2.

    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
    builds LLVM 3.7 + x265 1.7+xxx ... vs .... GCC 4.9....5.2

    Comment


    • #3
      3.6.0 should be 3.6.2 as it is the most stable version of 3.6 for LLVM.

      Bullet Physics 2.82 has been out for some time. I'd be more interested in Bullet 3 which includes 2.83 and the OpenCL version Bullet 3.0 nearing release.
      Last edited by Marc Driftmeyer; 31 August 2015, 02:21 PM.

      Comment


      • #4
        Is it possible some distos will build some packages with llvm and some with gcc in the future based on benchmarks?

        Comment


        • #5
          gcc still wins in the end
          gcc can look at clang and steal their optimizations, reverse isn't legal.
          Lol, BSD license.

          Comment


          • #6
            I think it's great that LLVM/CLANG is pretty close to being on a par with GCC for nearly everything.

            Progress building the linux kernel for all platforms looks good

            Comment


            • #7
              I'd expect to see the comparison with automatically vectorized AVX2/AVX/SSE4
              AND comparison with OpenMP runtime

              Comment


              • #8
                clang 3.6.2 actually beats gcc at -O3 for oggenc on my sparc64 T2000. Here are the results for clang -O3 , gcc and gcc -O3


                clang -target sparc-unknown-linux-gnu -O3 oggenc.c -o oggenc -lm
                leafblower ~ # time ./oggenc jfk_1963_0626_berliner.wav -o test.ogg
                Opening with wav module: WAV file reader
                Encoding "jfk_1963_0626_berliner.wav" to
                "test.ogg"
                at quality 3.00
                [ 99.9%] [ 0m00s remaining] |

                Done encoding file "test.ogg"

                File length: 8m 37.0s
                Elapsed time: 3m 48.7s
                Rate: 2.2627
                Average bitrate: 69.0 kb/s


                real 3m48.708s
                user 3m48.110s
                sys 0m0.450s
                leafblower ~ # gcc oggenc.c -o oggenc-gcc -lm
                leafblower ~ # time ./oggenc jfk_1963_0626_berliner.wav -o test.ogg
                oggenc oggenc.c oggenc-gcc
                leafblower ~ # time ./oggenc-gcc jfk_1963_0626_berliner.wav -o test-gcc.ogg
                Opening with wav module: WAV file reader
                Encoding "jfk_1963_0626_berliner.wav" to
                "test-gcc.ogg"
                at quality 3.00
                [ 99.9%] [ 0m00s remaining] |

                Done encoding file "test-gcc.ogg"

                File length: 8m 37.0s
                Elapsed time: 7m 24.6s
                Rate: 1.1640
                Average bitrate: 69.0 kb/s


                real 7m24.564s
                user 7m21.870s
                sys 0m0.800s
                leafblower ~ # gcc oggenc.c -o oggenc-gcc -lm -O3
                leafblower ~ # time ./oggenc-gcc jfk_1963_0626_berliner.wav -o test-gcc-03.ogg
                Opening with wav module: WAV file reader
                Encoding "jfk_1963_0626_berliner.wav" to
                "test-gcc-03.ogg"
                at quality 3.00
                [ 99.9%] [ 0m00s remaining] |

                Done encoding file "test-gcc-03.ogg"

                File length: 8m 37.0s
                Elapsed time: 3m 58.2s
                Rate: 2.1729
                Average bitrate: 68.7 kb/s


                real 3m58.160s
                user 3m56.780s
                sys 0m0.380s

                Comment


                • #9
                  Originally posted by utack View Post
                  Is it possible some distos will build some packages with llvm and some with gcc in the future based on benchmarks?
                  In the future it's possible, but it's improbable for them to use one compiler for one set, and another for the rest, as then you're going to have to mess with environmental variables and such, and it's just cleaner to build with one.

                  Originally posted by peppercats
                  gcc still wins in the end
                  gcc can look at clang and steal their optimizations, reverse isn't legal.
                  Lol, BSD license.
                  That's not how that works. That might be true if GCC and LLVM/CLang had anything close to the same codebase, but they don't. So at best GCC can take ideas from LLVM, and the only question would be whether LLVM using the ideas from GCC would be derivative works, as that's not well defined.

                  Comment


                  • #10
                    Could someone please explain to me how the compiler benchmarks work? The only one where it is obvious to me is the timed Apache compilation.
                    How is it done in the other tests? Is the compiler used to compile the benchmark binaries/libs (this is what I assume, but I'm not sure), or is the compiler somehow used by the benchmark tools?
                    Last edited by woife; 02 September 2015, 07:06 AM. Reason: typo

                    Comment

                    Working...
                    X