3 ms·
> UB has nothing to do with optimization. Other commenters already responded to this, but I thought I'd link an article I came across a while back that gives a
by Reelin 6y ago
> UB has nothing to do with optimization.
Other commenters already responded to this, but I thought I'd link an article I came across a while back that gives a concrete and easy to understand example of how UB can be leveraged for optimization by modern compilers. (https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=633 https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63...)