Super interesting publication: https://web.ist.utl.pt/nuno.lopes/pubs/ub-pldi25.pdf It analyzes how much compilers actually gain from exploiting undefined behavior to optimize C/C++ code, by hacking up LLVM to eliminate UB and thus denying the optimizer those strategies.
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.
I find this super interesting, because I'd naively assume that forcing the compiler to assume that pointers can alias would be catastrophic, but instead... it's kinda within the range where you could choose to pay for a slightly bigger computer in exchange for a language that doesn't randomly stab you in the face in non-obvious ways.