Performance Impact of Exploiting Undefined Behavior in C/C++
Published in EuroLLVM23, 2023
Clang and LLVM use undefined behavior (UB) to issue code optimizations. Currently, there is no study that evaluates the performance impact of this class of optimizations. We fill this gap by presenting some early results in this area. Phoronix Test Suite was used to evaluate the performance of a diverse set of applications, including webservers, com- pression algorithms, graphical environments, etc. By com- piling each application with flags that trigger specific UBs, we gathered various metrics (requests per second, MB/s, FPS, etc) for further analysis.