NVIDIA Working On "-flto-partition=locality" GCC Option To Boost Performance For Some CPU Workloads

Written by Michael Larabel in NVIDIA on 6 January 2025 at 10:05 AM EST. 1 Comment
NVIDIA
NVIDIA compiler engineers have spent the past several months working on a proposed GCC option -flto-partition=locality for having the compiler optimize the code layout for locality between callees and callers as part of the link-time optimization (LTO) process. For some workloads NVIDIA is finding this -flto-partition=locality compiler option being of significant help for bettering the CPU performance.

NVIDIA engineers have been working on improvements to the GNU Compiler Collection for optimize the code layout for locality between callees and callers to minimize the branch distance between frequently called functions. For large applications NVIDIA is finding their proposed patch can be of significant benefit but no actual performance benchmark numbers were provided.

flto locality


Back in November was the patch proposal for adding the -flto-partition=locality option to GCC. There it's stated:
"With this optimization we are seeing good performance gains on some large internal workloads that stress the parts of the processor that is sensitive to code locality, but we'd appreciate wider performance evaluation."

It's gone without action for some weeks but recently GCC developer Jan Hubicka has taken to reviewing the patch. Here's to hoping the worked up version of -flto-partition=locality will be revised soon and the performance numbers will pan out for a variety of larger workloads. Stay tuned for if/when the -flto-partition=locality patch is upstreamed and any performance benchmark numbers that may get posted.
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