r/cpp • u/pavel_v • Oct 21 '25
When Compiler Optimizations Hurt Performance
https://nemanjatrifunovic.substack.com/p/when-compiler-optimizations-hurt
69
Upvotes
r/cpp • u/pavel_v • Oct 21 '25
View all comments
2
u/Sopel97 Oct 21 '25
and what happens with PGO?
Without PGO compiles lack necessary information to choose a faster implementation here, and I'd consider using
switchto indicate that a jump table is preferable in any case. If you want branches with high likelihood then use branches.