When Zero-Cost Abstractions Aren’t Zero-Cost

Steve Sorkin

⏱ 60 mins
intermediate
advanced
14:00-15:00, Saturday, 20th June 2026

Zero-cost abstractions are a foundational idea in C++, promising expressive, high-level code without sacrificing performance. However, developers often encounter unexpected costs when using modern abstractions in practice, even when the code appears idiomatic and well-designed.

This talk explores the assumptions behind zero-cost abstractions and examines what happens when those assumptions no longer hold. Through concrete examples drawn from modern C++ — including ranges and views, type erasure, allocators, and other common abstractions — we will examine how factors such as optimizer visibility, inlining boundaries, allocation behavior, and runtime flexibility influence performance.

This talk treats abstraction as a powerful engineering tool, examining the limits of its zero-cost guarantees in real-world systems. We will look at how seemingly small design choices can introduce hidden costs, why those costs are often difficult to spot through inspection alone, and how to recover performance without abandoning good design or readability.

Attendees will leave with a clearer understanding of when abstractions are truly zero-cost, how to recognize situations where they are not, and how to make informed tradeoffs between expressiveness, flexibility, and performance in modern C++.


🏷 performance
🏷 optimizations
🏷 abstractions
🏷 templates

Steve Sorkin

Steve Sorkin has been at Bloomberg since 2019, where he is a senior software engineer. He is enthusiastic about writing clean, scalable, and maintainable code for use in low latency and high throughput applications. Prior to joining Bloomberg, Steve worked as a securities/derivatives attorney. He holds a bachelor’s degree in computer engineering from Lehigh University, a master’s degree from Georgia Tech, and a J.D. from Harvard Law School.