Announcement

Collapse
No announcement yet.

GCC 12 Compiler Optimization Tuning With The AMD Ryzen Threadripper 3990X

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

  • GCC 12 Compiler Optimization Tuning With The AMD Ryzen Threadripper 3990X

    Phoronix: GCC 12 Compiler Optimization Tuning With The AMD Ryzen Threadripper 3990X

    Following the recent discussions about -O3'ing the Linux kernel and other compiler optimizations, a request came in to see some fresh GCC compiler optimization benchmarks with the recently released GCC 12. So here is a fresh look at various GCC optimization levels up through -Ofast as well as with link-time optimizations (LTO) and "-march=native" tuning on the new GCC 12 with the mature AMD Ryzen Threadripper 3990X platform.

    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
    Michael

    Would be nice to see the Geometric Mean Of All Test Results not as numbers but as percentages, e.g. 100% for -O2 and then the others as improvements or regressions over -O2 (100%). Makes understanding the results a lot easier than performing mental gymnastics. Thank you.

    Comment


    • #3
      Damn. So -Ofast really do go brrrrrttttttt

      In other news it's nice to know that I've probably been doing it wrong being conservative with -O2 -march=znver2 with my Zen 2

      Comment


      • #4
        Originally posted by skeevy420 View Post
        Damn. So -Ofast really do go brrrrrttttttt
        -Ofast is not really safe. I tried it with something safe and compiled dxvk with it - immediately received glitched graphics and GPU hang . So -O3 -march=znver3 -flto=auto is my option here

        Comment


        • #5
          as others have noted, Ofast is not safe. GCC specifically states it enables optimizations that may not be safe. for example it enables fast math and allow-store-data-races which are the type of optimizations that may break things but only be visible under extreme load / rare edge cases.

          I might have missed it but you should probably caution users about that before showing plots with it at the top…

          that O3 consistently beats O2 with native was a welcome surprise to me. Thanks for all the benchmarks!

          Comment


          • #6
            Originally posted by V1tol View Post
            -Ofast is not really safe. I tried it with something safe and compiled dxvk with it - immediately received glitched graphics and GPU hang . So -O3 -march=znver3 -flto=auto is my option here
            Not a surprise whatsoever. I'm probably gonna bump it back to -O3 by default after seeing these results.

            Michael That post reminded me that there was an AOCL release a week and a half ago that I don't think Phoronix covered.

            Comment


            • #7
              Originally posted by Markopolo View Post

              that O3 consistently beats O2 with native was a welcome surprise to me. Thanks for all the benchmarks!
              Ditto.

              Comment


              • #8
                but what about the bigger binaries and the buffer bloat ppl where whining about?

                Comment


                • #9
                  Great article, is it possible to test with PGO? Really interested how much faster it is.

                  Comment


                  • #10
                    Originally posted by skeevy420 View Post

                    Not a surprise whatsoever. I'm probably gonna bump it back to -O3 by default after seeing these results.

                    Michael That post reminded me that there was an AOCL release a week and a half ago that I don't think Phoronix covered.
                    I hope aocc 3.3 will follow soon?

                    Comment

                    Working...
                    X