anon-3988 1 day ago

If they want the program to do exactly what is told they won't get to have optimization.

2
dminik 1 day ago

It doesn't really seem worth it. https://web.ist.utl.pt/nuno.lopes/pubs/ub-pldi25.pdf

> The results show that, in the cases we evaluated, the performance gains from exploiting UB are minimal. Furthermore, in the cases where performance regresses, it can often be recovered by either small to moderate changes to the compiler or by using link-time optimizations.

waynecochran 1 day ago

That's the whole point of UB -- it leaves open more possibilities for optimization. If everything is nailed down, then the options are more restricted.