Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris Jusiak @CppCon
Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris Jusiak  @CppCon
Uploaded November 2025 | Updated September 2026, 2 weeks ago
cppcon.org
---

Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris Jusiak - CppCon 2025
---

We've all seen (or written!) benchmarks claiming "X is faster than Y" - only to discover the opposite in production. Most microbenchmarks lie by omission, focusing only on throughput and hiding critical factors like branch prediction, cache effects, and pipeline stalls behind deceptively simple numbers.

In this talk, we will explore how to avoid common microbenchmarking pitfalls by leveraging (directly from C++23):

- Hardware performance counters and processor tracing
- Machine code and top-down microarchitecture analysis
- Statistical and visualization techniques

Topics covered:

- Why "naked" performance numbers are often meaningless
- How to detect and eliminate misleading benchmarks
- How to choose the right tools
- when to benchmark, what to benchmark (latency vs. throughput), and when to stop
- How to extract actionable insights from hardware performance counters, processor traces, and machine code

We'll dissect real-world benchmarks that appear to show "optimizations" but in reality degrade performance.

The goal is to illustrate why raw performance numbers can't be trusted - and how to successfully transfer microbenchmarking insights to production code.

---

Slides: github.com/CppCon/CppCon2025/blob/main/Presentations/Performance_Is_Not_a_Number.pdf

Work at Hudson River Trading (HRT): tinyurl.com/safxfctf
---

Kris Jusiak

Nanosecond count
---


CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---

Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---

#cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer
Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris JusiakBack to Basics: Move Semantics - Ben Saks - CppCon 2025Lightning Talk: Trust Nothing, Complain About Something, Want Everything - Jonathan Stein - CppConWhy Every C++ Game Developer Should Learn SDL 3 Now - Mike Shah - CppCon 2025Threads vs Coroutines — Why C++ Has Two Concurrency Models - Conor Spilsbury - CppCon 2025Lightning Talk: The Type Safe Builder Pattern for C++ - John Stracke - CppCon 2025Lightning Talk: Promote Modern C++ Usage With Coding Questions Part 2 - Zhenchao Lin - CppCon 2025Interview With Patrice Roy (Optimizing with Modern C++) - CppCon 2024Crafting the Code You Don’t Write: Sculpting Software in an AI World - Daisy Hollman - CppCon 2025Leverage AI Agents to Refactor and Modernize C++ Code - Jubin Chheda - CppCon 2025CppCon 2016: Arthur ODwyer “Template Normal Programming (part 1 of 2)”Zero-Overhead Abstractions: Building Vector Math Libraries with Concepts and Customization Points
CppCon |

Why 99% of C++ Microbenchmarks Lie – and How to Write the 1% that Matter! - Kris Jusiak

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER