Announcement

Collapse
No announcement yet.

GCC vs. Clang Benchmark Comparison At Varying Optimization Levels

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

  • GCC vs. Clang Benchmark Comparison At Varying Optimization Levels

    Phoronix: GCC vs. Clang Benchmark Comparison At Varying Optimization Levels

    Last week I posted various LLVM Clang and GCC compiler benchmarks using packages available on Ubuntu 16.04 LTS and with the testing from a Xeon Skylake system. Today are some complementary tests when benchmarking GCC 5.3.1 and LLVM Clang 3.8 while testing each compiler with a variety of different optimization levels.

    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
    The individual graph bars look very tall here making it difficult to read. Using firefox 44.0.2 if that matters

    Comment


    • #3
      Hi,

      Thank you for the benchmarks.

      I think that it would be interesting to include the intel compiler in the benchmark. This one claims to be faster and I really wonder if it is true.

      Regards,
      Alex.

      Comment


      • #4
        Originally posted by babali View Post
        Hi,

        Thank you for the benchmarks.

        I think that it would be interesting to include the intel compiler in the benchmark. This one claims to be faster and I really wonder if it is true.

        Regards,
        Alex.
        Unfortunately I own no license for the ICC.
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          Originally posted by CapsAdmin View Post
          The individual graph bars look very tall here making it difficult to read. Using firefox 44.0.2 if that matters
          Due to having to rotate the longest string (-Ofast - march=native) for that number of tries. If other ways to make the graphs smaller, patches welcome against pts_Graph in phoronix-test-suite on GitHub.
          Michael Larabel
          https://www.michaellarabel.com/

          Comment


          • #6
            Very interesting. -O0 is mostly pointless for performance comparisons, but it is a nice inclusion for compilation speed.

            Now, we just need to answer the question of binary-size, and the benefit of -Os and cost of -O3, but I guess you don't have any benchmarks for binary size yet?.

            Btw, it appears clang has a few problems with some optimizations at -O2 and in skylake tuning, hopefully they can fix those soon.

            Comment


            • #7
              Originally posted by carewolf View Post
              Now, we just need to answer the question of binary-size, and the benefit of -Os and cost of -O3, but I guess you don't have any benchmarks for binary size yet?.
              Wouldn't need any 'benchmarks' per se.... PTS can systematically figure out the binary being built, just as it figures out what compiler flags a program is being built with, etc. So it could universally report binary sizes of programs being compiled. However, I haven't had the time nor any commercial users interested in said support so it probably won't come until I magically find the time, someone contributes the feature, or there are tips or commercial interest toward that functionality.
              Michael Larabel
              https://www.michaellarabel.com/

              Comment


              • #8
                Nice comparison, but the chart bars definitely need to be even taller, so that only one level of optimization is visible on the screen at a time.


                Originally posted by Michael View Post
                Due to having to rotate the longest string (-Ofast - march=native) for that number of tries. If other ways to make the graphs smaller, patches welcome against pts_Graph in phoronix-test-suite on GitHub.
                Wouldn't it be significantly easier to shorten the string, split in two lines or whatever? Something like "-O3n" and in the chart legend specify that "n" stands for "march=native"?

                Besides, the bars combined are still twice as tall as the string, so it does seem they could be half the height without even shortening the string.
                Last edited by ddriver; 03 March 2016, 06:24 PM.

                Comment


                • #9
                  Originally posted by ddriver View Post
                  Wouldn't it be significantly easier to shorten the string, split in two lines or whatever? Something like "-O3n" and in the chart legend specify that "n" stands for "march=native"?
                  Possibly, patches welcome to make that a possibility if you're interested in this feature.

                  For anyone interested, the code is right here: https://github.com/phoronix-test-sui...ects/pts_Graph
                  Michael Larabel
                  https://www.michaellarabel.com/

                  Comment


                  • #10
                    Originally posted by Michael View Post

                    Possibly, patches welcome to make that a possibility if you're interested in this feature.

                    For anyone interested, the code is right here: https://github.com/phoronix-test-sui...ects/pts_Graph
                    I don't understand this. Surely when something breaks in a way that makes it fundamentally useless it should get fixed regardless if there is a request for some feature?

                    Comment

                    Working...
                    X