3 ms·
Nope, you're correct. On the other hand, earlier today I read a post about a pretty similar-seeming phenomenon (signed overflow UB reducing the number of lea i
by comex 10y ago
Nope, you're correct. On the other hand, earlier today I read a post about a pretty similar-seeming phenomenon (signed overflow UB reducing the number of lea instructions that have to be generated):
https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7 https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759...
Perhaps the author had heard that -fwrapv causes extra 'lea's but got mixed up as to why. (TL;DR: it makes it harder for the compiler to prove that you're not a sadist using negative array indices.)