Streamlining C++ Code - Avoiding Unnecessary C++ Object Creation - C++Now 2025
https://www.cppnow.org --- Streamlining C++ Code - Avoiding Unnecessary C++ Object Creation - Chandranath Bhattacharyya & Kathleen Baker - C++Now 2025 --- 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 moving constant objects with global lifetimes to compile-time data structures. This session includes code examples to demonstrate these principles in action. By the end of the talk, attendees will be equipped with actionable takeaways to enhance the efficiency of their C++ codebases. --- Slides: https://github.com/boostcon/cppnow_presentations_2025/blob/main/Presentations/Streamlining_Cpp_Code.pdf think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: https://www.think-cell.com/en/career/tech--- Chandranath Bhattacharyya I have been a professional programmer since 2000 with most of my time working with C++. Kathleen Baker 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. --- C++Now 2026 - 4th May - 8th May C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world. Annual CppNow Conference - https://www.cppnow.org https://www.linkedin.com/company/cppnow https://twitter.com/cppnow https://www.facebook.com/CppNow https://www.reddit.com/r/CppNow https://mastodon.social/@cppnow Video Sponsors: think-cell and Bloomberg --- Videos Filmed & Edited By Bash Films: https://bashfilms.com/ YouTube Channel Managed & Optimized By Digital Medium Ltd: https://events.digital-medium.co.uk --- #performance #objects #boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus #softwaredevelopment
Download
0 formatsNo download links available.