CppCon, The C++ Conference’s Post

CppCon, The C++ Conference 2025 September 14-19th, Aurora, Colorado Preview: Hui Xie: "Implement Standard Library: Design Decisions, Optimisations and Testing in Implementing Libc++" https://sched.co/27bNw 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 technic we share tests between runtime and constexpr, negative testing and so on.

To view or add a comment, sign in

Explore content categories