News: 0001517060

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

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

([NVIDIA] 115 Minutes Ago -flto-partition=locality)


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.

Back in November was [1]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 [2]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.



[1] https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668996.html

[2] https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672610.html



pegasus

mixed emotions:
Watching your mother-in-law back off a cliff...
in your brand new Mercedes.