One Line x86 Change To GCC Compiler Nets +12% Benchmark Win For Modern Intel/AMD CPUs - Phoronix
Articles & Reviews
News Archive
Forums
Premium Ad-Free<br>Contact
Popular Categories
Close
Articles & Reviews
News Archive
Forums
Premium
Contact
Categories
Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals
One Line x86 Change To GCC Compiler Nets +12% Benchmark Win For Modern Intel/AMD CPUs
Written by Michael Larabel in GNU on 24 June 2026 at 06:45 AM EDT. 17 Comments
A one line code change to the GNU Compiler Collection (GCC) for its generic x86 tuning is benefiting modern Intel and AMD processors.
Intel software engineer Lili Cui discovered it's quite worthwhile increasing the misprediction cost of the generic x86 tuning for the GCC compiler. On the basis of modern CPUs having deeper pipelines and thus making branch mispredictions more expensive, increasing the cost in the generic tuning table helps avoid pipeline stalls from mispredicted branches. This is for those just relying on the generic x86/x86_64 tuning and not any CPU-specific -march=native type builds.
By simply increasing the branch mispredict scale by three, it was found to increase the performance on Granite Rapids by 12.7% and by AMD Zen 5 for 12.1%. That is for SPEC CPU 2017's 544.nab_r Nucleic Acid Builder (NAB) test case. No other performance numbers were shared in the Git commit/patch but in any event a 12% win for at least one SPEC CPU test case is quite enticing -- especially from changing a single line of code -- and it will be interesting to see the impact on other workloads.
This change is merged in GCC Git for next year's GCC 17 stable release.
17 Comments
Tweet
GCC 17 Lands Initial Infrastructure For C++29<br>GCC Steering Committee Supports Inclusion Of WebAssembly Backend<br>GNU Linux-libre 7.1-gnu Released With More Driver Deblobbing, Unhappy With i486 Removal<br>GCC 17 Merges Function Multi-Versioning For APX & AVX10.2<br>GCC 15.3 Compiler Brings Nearly A Year Worth Of Bug Fixes<br>NVIDIA Engineer Devises Patch To Significantly Reduce GCC Bootstrap Time
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.
Linux Finally Eliminates The strncpy API After Six Years Of Work, 360+ Patches<br>systemd 261 Released With New systemd-sysinstall OS Installer, IMDSD & Storagectl<br>Open-Source NVIDIA NVK Vulkan Driver Now Supports DLSS<br>"Disgusting" Linux sched_ext Source Code Restructured Following Complaint By Linus Torvalds<br>Google's Gemini Partially Figures Out A Lengthy Linux Boot Time On Modern ASUS Laptop<br>Epic Games Announces Lore Open-Source Version Control System<br>Steam Machine Launches, Priced $1049 To $1428 USD<br>Claude AI Assists In Fixing Years Old AMD Radeon Linux Display Bug Affecting Numerous Laptops
AMD Contributes ONNX Runtime Backend To FFmpeg DNN Filter
Linux 7.2 Staging Still Working To Tame The Realtek RTL8723BS "Beast Of A Driver"
KSMBD Adds SMB2 Compression Support In Linux 7.2
MGLRU Improvement Yielding Nice Gains On Linux 7.2: MongoDB 30~100% Higher Throughput
NTFS3 Driver Sees Bug Fixes & Minor Improvements With Linux 7.2
New AMD Linux Patches Expose Gamma 2.4 + Gamma 2.6 Curves
"So Many AI-Fueled Fixes" Means No New ARM64 KVM Features For Linux 7.2
One Line x86 Change To GCC Compiler Nets +12% Benchmark Win For Modern Intel/AMD CPUs
"Disgusting" Linux sched_ext Source Code Restructured Following Complaint By Linus Torvalds
COSMIC Epoch 1.1 Released With COSMIC-Monitor, Compositor Improvements
Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations.
SilverStone RM32 3U Server Chassis + 1000W Extreme 1000Rz Platinum PSU
Benchmarking Bcachefs 1.38.6: The First Release No Longer "Experimental"
How NVIDIA Vera CPU Performance Compares To The Ampere Altra Max
Open-Source Success Achieved For Greater Transparency & Security: Running AMD openSIL + Coreboot On EPYC
Benchmarking The Performance Benefits To Ubuntu 26.10 amd64v3 Packages
The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by subscribing to Phoronix Premium. You can also contribute to Phoronix through tips/donations via PayPal or Stripe.
Contact
Michael Larabel
Support Phoronix
While Having Ad-Free Browsing,
Single-Page Article Viewing
Twitter / X
Legal Disclaimer, Privacy Policy, Cookies | Privacy...