r/cpp • u/pavel_v • Oct 21 '25
When Compiler Optimizations Hurt Performance
https://nemanjatrifunovic.substack.com/p/when-compiler-optimizations-hurt
66
Upvotes
r/cpp • u/pavel_v • Oct 21 '25
View all comments
9
u/FrogNoPants Oct 21 '25
Optimizing while only processing 1 byte a time, and having a switch statement(that basically does nothing) is certainly a choice..
If you are optimizing instructions and not using SIMD, you aren't really optimizing, and also don't stick switch statements in inner loops.