Kathleen is a software engineer working at Microsoft on the Edge browser. She is very excited about presenting at her first C++ conference. In her free time, she likes to do triathlons and try new foods.
Avoiding unnecessary temporary object creation in C++ is crucial for improving performance and reducing resource usage. This talk delves into common scenarios where temporary objects are created and provides practical strategies for improving code. We'll cover some best practices identified during code reviews within our organization. We’ll begin with techniques for reducing temporary objects in commonly used types like std::string and std::vector, and then extend our journey to other STL types such as std::pair, std::tuple, std::optional, std::expected, std::variant, std::initializer_list, as well as other sequence and associative containers. Attendees will also learn to avoid costly operations by using transparent comparators and […]