Branchless Quicksort: How Modern Compilers Optimize Code with the Right Programming Style
Recently, while I was working on an optimized Quicksort implementation, I came across a rather interesting quirk. Modern compilers (especially Clang) optimize loops using fast, branch-free instructions - provided you use the right programming style.