0:00 / 0:00
#lock-free#concurrency#benchmarking
Lock-free Programming is Dead - Long Live Lock-free Programming! - Fedor G Pikus - C++Now 2026
CppNow
39K subscribers • 42 videos on Hallway • Conference channel
- One of the most-watched uploads on C++Now, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
- Presented by Fedor G. Pikus
- Linked in the descriptionboostcon/cppnow_presentations_2026
- An opinion. It argues one side of a question engineers disagree on.
Advanced. Deep dive for people who know the field.
32K views3 months ago
Systems programmingProgramming languagesConcurrency and parallelismPerformance and optimizationC++
Fedor G. Pikus presents benchmarks across modern CPU architectures to challenge traditional assumptions about lock-free programming versus modern locks.
cppnow.org --- Lock-free Programming is Dead - Long Live Lock-free Programming! - Fedor G Pikus - C++Now 2026 --- For decades, lock-free programming has been the go-to optimization for the most contended parts of concurrent programs. The reasoning was simple: locks are slow under contention, so eliminate the locks. This made sense on the hardware of the time, and I should know—I've given several talks explaining how and why to do it. The hardware has changed. Modern CPUs are very, very good at locks. Specifically, they are highly optimized for the operations that make locks fast: cache line transfers, memory ordering, and speculative execution through lock acquisitions. So good, in fact, that the old advice requires a serious reckoning. In this talk, I will present extensive benchmarks across multiple CPU architectures—Intel, AMD, ARM server, and Apple silicon—that challenge the conventional wisdom about lock-free performance. We will see that under high contention, a well-implemented spinlock consistently outperforms lock-free atomics and CAS loops, often by massive margins. The reason is counterintuitive: lock-free operations under heavy contention flood the memory subsystem with coherence traffic, degrading not just the contending threads but the entire system. A spinlock serializes access cleanly and lets the rest of the machine get on with useful work. To be clear: if your system strictly requires progress guarantees—such as avoiding deadlocks, priority inversion, or executing safely in a signal handler—lock-free techniques remain your only tool. But if you are reaching for lock-free data structures purely for throughput, the plot has completely flipped. Lock-free programming is not dead; it has simply relocated. The same benchmarks show that for low-contention shared data—the occasional update, the lightly touched counter, the publishing protocol—atomics win decisively. There is no lock overhead, no pipeline disruption, just one fast instruction on the happy path. We will also look at why these tradeoffs play out so differently on modern silicon: why AMD's streaming architecture pays a heavier price for lock disruption, why Apple silicon penalizes contended atomics more brutally than anyone else, and why "ARM vs x86" is the wrong way to think about it (what matters is the chip's market, not its instruction set). If you've ever reached for a complex lock-free algorithm to speed up a highly contended hot path, this talk will change your mind about where lock-free programming truly belongs. --- Slides: github.com/boostcon/cppnow_presentations_2026/blob/main/Pres… think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/carWhy it's here
A top upload from a listed channelC++Now is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.