Loading…
Thursday September 17, 2026 16:45 - 17:45 MDT
Are you smarter than a branch predictor? In this interactive, game-show themed session, the audience becomes the branch predictor: participants vote on which of two C++ snippets will run faster before we examine what actually happens on real hardware. The snippets are drawn from real world production code, and correct answers are rewarded with stress balls. Through these examples, we build a practical mental model of how modern CPUs handle control flow, and why even small branching decisions can have a significant impact on performance. A single mispredicted branch can stall a CPU pipeline for dozens of cycles, making control flow a hidden bottleneck in performance-critical systems. Using annotated assembly, performance counter data, and cross-platform comparisons, this talk explores branch prediction, misprediction costs, indirect calls and virtual dispatch, and the trade-offs between branches and conditional moves. We examine how compilers (GCC, Clang, MSVC) transform code under different optimization levels (such as -O2 and -O3), and highlight non-obvious cases where “branchless” code performs worse or behaves differently across architectures. The examples are intentionally small micro-benchmarks, but each exposes patterns that appear in real-world systems when control flow becomes the bottleneck. The session also covers how to design trustworthy micro-benchmarks and validate performance changes using hardware counters. Attendees will leave with a clearer understanding of how branches behave on modern processors, when to rely on compiler optimizations, and when to measure and optimize manually.

Presenters
avatar for Michelle D'Souza

Michelle D'Souza

Software Engineer, Bloomberg
Michelle Fae D’Souza is a Software Engineer at Bloomberg, where she develops C++ code for the company’s order-trade entry and modification (OTE API) solution, which streamlines trading activity for many firms in the financial world. She is an active member of Bloomberg's C++ Guild... Read More →
Thursday September 17, 2026 16:45 - 17:45 MDT
_2

Attendees (1)


Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link