Benchmarking Retpoline-Enabled GCC 8 With -mindirect-branch=thunk
Written by Michael Larabel in Software on 16 January 2018. Page 2 of 2. 5 Comments

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

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 tips are also graciously accepted. Thanks for your support.

Related Articles
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Trending Linux News