Announcement

Collapse
No announcement yet.

GCC 12 Compiler Performance Is Looking Good For Intel Alder Lake

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

  • GCC 12 Compiler Performance Is Looking Good For Intel Alder Lake

    Phoronix: GCC 12 Compiler Performance Is Looking Good For Intel Alder Lake

    GCC 12 is nearing release in a few months time as the annual feature update to the GNU Compiler Collection for this Free Software Foundation backed code compiler. On top of new C/C++ language features and various optimization improvements, there is updated tuning for Intel's new Alder Lake processors. Here are some early GCC 11.2 vs. GCC 12 development benchmarks looking at the performance on a Core i5 12600K.

    https://www.phoronix.com/vr.php?view=30753

  • #2
    Why is GCC 12 faster in everything including video encoders but slower in all SVT encoders (that are made by intel)? Regression?

    Comment


    • #3
      Originally posted by Anux View Post
      Why is GCC 12 faster in everything including video encoders but slower in all SVT encoders (that are made by intel)? Regression?
      Not sure, but your comment made me notice that all the HEVC tests have both -O3 and -O2.

      Code:
      gcc options: -O3 -march=native -flto -fPIE -fPIC -O2 -pie -rdynamic -lpthread -lrt

      Comment


      • #4
        Originally posted by skeevy420 View Post

        Not sure, but your comment made me notice that all the HEVC tests have both -O3 and -O2.

        Code:
        gcc options: -O3 -march=native -flto -fPIE -fPIC -O2 -pie -rdynamic -lpthread -lrt
        Yeah, and the SVT-AV1 test has an erroneous -mno-avx right before -mavx2, though -mavx2 should override -mno-avx in that case. The compiler options seems to be collecting some random noise.

        Comment


        • #5
          My understanding is, that only the last option counts, so the O3 got overridden by O2 and the same with no avx. If there wasn't some error and both GCCs where tested with the exact same command line it should not be of concern. It also doesn't explain the other SVT-test that had clean arguments in its command line.
          Maybe the new GCC does something different with AVX and ends up in a more mixed code (AVX/nonAVX) which could lead to worse performance on Intel CPUs.

          Comment


          • #6
            GCC 12 enables -ftree-vectorize (very-cheap) with -O2, maybe this is related!

            Comment


            • #7
              Originally posted by Anux View Post
              Why is GCC 12 faster in everything including video encoders but slower in all SVT encoders (that are made by intel)? Regression?
              There's a lot of heuristics involved in fine tuning compiler optimization passes (and pass ordering, for that matter). It's almost inevitable that while a change would be an improvement overall, there is some particular software that becomes slower.

              A detailed look into what exactly happened that caused the SVT regression would be interesting, but also require in-depth compiler expertise and a lot of effort.

              Comment


              • #8
                Originally posted by Anux View Post
                My understanding is, that only the last option counts, so the O3 got overridden by O2 and the same with no avx. If there wasn't some error and both GCCs where tested with the exact same command line it should not be of concern. It also doesn't explain the other SVT-test that had clean arguments in its command line.
                Maybe the new GCC does something different with AVX and ends up in a more mixed code (AVX/nonAVX) which could lead to worse performance on Intel CPUs.
                I know. I was just pointing out that, for whatever reason, those tests were throwing out multiple O levels which probably shouldn't be the case and could be worth investigating. FWIW, I spent about 15 minutes yesterday looking at the build scripts but nothing stood out to me. Granted that I'm not that familiar with internals of the PTS....nor am I a fan of how Michael likes to echo new scripts. I like "cat <<EOF > script.sh"....because it's easier to lazily copy/paste into a blank file for syntax highlighting.

                Comment

                Working...
                X