r/cpp • u/Little-Reflection986 • Feb 16 '26
Favorite optimizations ??
I'd love to hear stories about people's best feats of optimization, or something small you are able to use often!
135
Upvotes
View all comments
12
u/Sopel97 Feb 16 '26 edited Feb 16 '26
In Stockfish we manually (as opposed to .text) replicate high-bandwidth eventually-read-only data on multiple NUMA nodes to get like 2-3x overall performance improvement on some hardware. https://github.com/official-stockfish/Stockfish/pull/5285
edit. it's also one of the reasons why we now have pretty much perfect thread scaling with extremely low variance even among the biggest machines https://openbenchmarking.org/test/pts/stockfish