Branchless Equivalents of Simple Functions | Harder, Better, Faster, Stronger
Modern processors are equipped with sophisticated branch prediction algorithms (the Pentium family, for example, can predict a vast array of patterns of jumps taken/not taken) but if they, for some…
Branchless Equivalents of Simple Functions | Harder, Better, Faster, Stronger Harder, Better, Faster, Stronger Explorations in better, faster, stronger code. Home About the author About this blog Branchless Equivalents of Simple Functions Modern processors are equipped with sophisticated branch prediction algorithms (the Pentium family, for example, can predict a vast array of patterns of jumps taken/not taken) but if they, for some reason, mispredict the next jump, the performance can take quite a hit. Branching to an unexpected location means flushing the pipelines, prefetching new instructi
saved by
related reading
- abseil / Performance Hintsabseil.io
- Beautiful Branchless Binary Search | Probably Danceprobablydance.com
- Weekend projects: getting silly with Clcamtuf.substack.com
- Getting silly with C, part -5^-7 - lcamtuf’s thinglcamtuf.substack.com
- What Every C Programmer Should Know About Undefined Behavior #2/3 - The LLVM Project Blogblog.llvm.org
- Competitive Programmer's Handbookcses.fi
- There are Only Four Billion Floats-So Test Them All! | Random ASCII – tech blog of Bruce Dawsonrandomascii.wordpress.com
- Effortless Performance Improvements in C++ | Julien Jorge's Personal Websitejulien.jorge.st
- A faster way to calculate the day-of-the-weekbenjoffe.com
- siboehmsiboehm.com
- Infographics: Operation Costs in CPU Clock Cycles - 6IT6it.dev
- abseil / Performance Hintsabseil.io