Benchmarking Retpoline-Enabled GCC 8 With -mindirect-branch=thunk
In some of the benchmarks, the overhead of avoiding speculative indirect calls is fairly minimal.
While in other workloads the overhead of using -mindirect-branch=thunk and -mindirect-branch=thunk-inline was quite noticeable.
Though with the kernel protected, you probably don't need to worry about e.g. building your chess application with Retpolines.
The Bullet Physics performance was also showed down by -mindirect-branch=thunk.
Those wishing to see more performance numbers when user-space tests are built with -mindirect-branch=thunk -mindirect-branch=thunk-inline can find more benchmarks via OpenBenchmarking.org.
If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.