Intel Makes One Line Tweak To GCC To Fix A "Random Performance Penalty"

Written by Michael Larabel in GNU on 29 May 2024 at 06:30 AM EDT. 18 Comments
GNU
Coming up on my radar today is a commit made to the GNU Compiler Collection (GCC) for adjusting the loop alignment with Intel's generic tuning path. In turn this should address "some random performance penalty in benchmarks" with coping better around cache lines.

Intel compiler engineer Haochen Jiang made this commit to GCC that landed today in GCC 15 Git:
"Previously, we use 16:11:8 in generic tune for Intel processors, which lead to cross cache line issue and result in some random performance penalty in benchmarks with small loops commit to commit.

After changing to always aligning to 16 bytes, it will somehow solve the issue."

That's it and tuning the loop alignment is said to take care of the performance penalty but without any further insight on the workload(s) tested and quantifying the impact. And, yes, the "it will somehow solve the issue" isn't exactly reassuring. Hopefully though this is a nice one-line improvement for Intel CPUs relying on GCC-built binaries with this tuning path.

GCC Intel generic loop alignment tuning


In any case every little bit counts and Intel engineers continue contributing a lot to the GCC and LLVM/Clang upstream compilers.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week