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
13
u/Nicksaurus Oct 21 '25
I wonder how much the performance depends on the dataset. Presumably for English UTF-8 text the sequence length is almost always 1 so the branch predictor is almost always correct. Maybe the results are different for other languages that use a lot of longer character encodings? I wouldn't expect it to make a huge difference but I'd be interested to see if it has any effect