Exploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the Performance Impact

22 points by PuercoPop


PuercoPop

Found the paper via https://hachyderm.io/@danderson/114384629213485347 which had the following summary:

They find that the performance degradation is only on the order of single digit percent, and that quite a few of those losses can be recovered with a little bit of compiler work to make non-UB optimization strategies work a little better.

The paper itself lists threats to its validity, in Section 5.3, which paints a less optimistic picture in that they know they didn’t covered the totality of UB.