CppCon 2025 C++ Standard Library:Design, Optimisations, Testing while Implementing Libc++ -- Hui Xie
Registration 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!
Implement the C++ Standard Library: Design, Optimisations, Testing while Implementing Libc++
by Hui Xie
Summary of the talk:
This presentation covers various practical examples in the designs, optimisations and testing in libc++, a standard library implementation.
In space optimisation section, it presents various examples of using compact type, reusing tail padding bytes, reusing unused bits in existing bytes, in various standard types: std::stop_token , std::expected , std::optional , std::variant , std::ranges library and std::move_only_function .
In time optimisations section, it presents examples of how we optimise std::atomic<T>::wait 's waiting strategy, how we optimised algorithms for segmented iterators, and also how we keep in mind optimisations by leaving the door open for future optimisations. At the same time, compilation time is also important so it also contains examples how unnecessary template instantiations can be avoided.
Finally, this talk covers the unit tests of libc++, including the high test coverage of standard spec, the technique we share tests between runtime and constexpr, negative testing and so on.

We continue our deep dive into memory mechanics. If you are just joining us, I recommend reviewing the foundations first. The first part covered the basics and the magic of simple data alignment, while the second part focused on how ordinary inheritance affects memory layout.
On Tuesday morning, September 15, the CppCon main stage will host a Language Designers Panel featuring three of the people who decide what the languages you use every day actually become:
Registration is now open for CppCon 2026! The conference starts on September 12 and will be held
Registration is now open for CppCon 2026! The conference starts on September 12 and will be held
GCC 16 is about to be released, so I'm sharing some of the new features I worked on this year. Some changes are visible to users, while others improve the system more subtly.