May 2026

CppCon 2025 Beyond Sequential Consistency: Unlocking Hidden Performance Gains -- Christopher Fretz

sequential-fretz.pngRegistration is now open for CppCon 2026! The conference starts on September 12 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year's conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2026!

Beyond Sequential Consistency: Unlocking Hidden Performance Gains

by Christopher Fretz

Summary of the talk:

In 2011, C++ introduced a formally defined memory model, providing a foundation for portable, multi-threaded code with well-defined correctness guarantees. This was a major milestone, enabling expressive threading primitives and safe concurrency patterns while allowing low-level optimizations for performance.

By default, C++ atomics enforce sequential consistency, which ensures intuitive, predictable behavior. However, these strong guarantees often exceed what’s necessary for correctness and come with a performance cost.

This talk delves into weaker memory orderings, particularly acquire/release and relaxed semantics, using a ring buffer as a practical example of how they can be used. We’ll also examine how the C++ memory model maps to real hardware, focusing on x86’s native guarantees, and comparing against less coherent platforms like ARM. We'll explore how strategic use of weaker synchronization can unlock significant performance gains without sacrificing correctness.

C++26: A User-Friendly assert() macro -- Sandor Dargo

SANDOR_DARGO_ROUND.JPGC++26 is bringing some long-overdue changes to assert(). But why are those changes needed? And when do we actually use assert, anyway?

At its core, assert() exists to validate runtime conditions. If the given expression evaluates to false, the program aborts. I’m almost certain you’ve used it before — at work, in personal projects, or at the very least in examples and code snippets.

So what’s the problem?

C++26: A User-Friendly assert() macro

by Sandor Dargo

From the article:

assert() is a macro — and a slightly sneaky one at that. Its name is written in lowercase, so it doesn’t follow the usual SCREAMING_SNAKE_CASE convention we associate with macros. There’s a good chance you’ve been using it for years without ever thinking about its macro nature.

Macros, of course, aren’t particularly popular among modern C++ developers. But the issue here isn’t the usual - but valid - “macros are evil” argument. The real problem is more specific:

The preprocessor only understands parentheses for grouping. It does not understand other C++ syntax such as template angle brackets or brace-initialization.

As a result, several otherwise perfectly valid-looking assertions fail to compile:

// https://godbolt.org/z/9sqM7PvWh
using Int = int;
int x = 1, y = 2;

assert(std::is_same<int, Int>::value);
assert([x, y]() { return x < y; }() == 1);
assert(std::vector<int>{1, 2, 3}.size() == 3);
 

 

Results summary: 2026 Annual C++ Developer Survey "Lite"

Thank you to everyone who reponded to our 2026 annual global C++ developer survey. As promised, here is a summary of the results, including one-page summaries of your answers to the free-form questions:

CppDevSurvey-2026-summary.pdf

A 145-page version of this report that also includes all individual write-in responses has now been forwarded to the C++ standards committee and C++ product vendors, to help inform C++ evolution and tooling.

Your feedback is valuable, and appreciated.

Stackless coroutines for gamedev in ~200 lines of C++ -- Vittorio Romeo

C++20 coroutines have lovely syntax, but they're a terrible fit for games.

In this article, we'll build a macro-base alternative that's more suitable for game development in ~200 lines of C++.

Stackless coroutines for gamedev in ~200 lines of C++

by Vittorio Romeo

From the article:

For a game I want a coroutine that is part of an object’s data. When the object dies, the coroutine dies with it. When I serialize the object to a save buffer, the coroutine’s state goes with it. When the optimizer is off, there is no extra cost compared to the equivalent state machine. C++20 coroutines do not provide any of these guarantees out of the box.

Let’s build something that does.