do not click

Meeting C++ 2025   |  Online   |  Training   |  Books   |  Survey   |  Job fair   |  Advertising   |  Jobposting   |  Login

Meeting C++ 2025 - Branch Prediction: Lessons From the Hot Path

Conference | Live Schedule | Talks | Get your ticket | Slides | Set your timezone

Branch Prediction: Lessons From the Hot Path

Join session

Books by John Farrier

Data Structures and Algorithms with the C++ STL: A guide for modern C++ practitioners

John Farrier

On Day 2 at 14:30 (CET/Berlin) in Track A [Saphir Room and online]

I am not a micro-architecture researcher or compiler engineer—I’m a C++ developer who cares when a loop misses its deadline. While writing some time-critical code that needed optimized prediction and conditional moves, I ran dozens of experiments, read the manuals so you don’t have to, and learned which patterns actually move the needle in production code.

This talk shares those field notes. We will:
* Show why a single mis-predicted branch still burns cycles.
* Explain, in plain language, how modern CPUs guess the future and why they sometimes guess wrong.
* Compare the compiler’s preferred branch to the branch-free `cmov`, with live Godbolt and `perf` demos.
* Walk through a checklist you can use today to make a hot path faster—no PhD in compiler design required.

The session balances practical detail with a light touch of humor, keeps code fonts large, and finishes on time.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy