Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Performance Analysis and Optimization of C++ Standard Libraries

CppNow via YouTube

Overview

Explore performance analysis and optimization techniques for C++ standard libraries in this CppNow conference talk. Dive into improvements made to libcxx and libstdc++, including enhancements to algorithms like string::find and basic_streambuf::xsgetn. Learn about the development of std-benchmark for cross-library performance analysis. Examine ongoing performance issues and potential solutions, such as optimizing number parsing in stringstream and improving std::sort. Gain insights into effective use of C++ standard libraries, including best practices for containers like std::vector and std::string. Discover the impact of compiler optimizations and function attributes on library performance. Benefit from lessons learned through extensive analysis of C++ standard libraries, covering topics like algorithm selection, container usage, and language features.

Syllabus

Intro
Performance improvements
Missing inlining opportunities in basic_string (libc++)
Missing function attributes (libc++)
Issues with number parsing in locale
sort (Average case)
vector vs. deque (push_back)
vector vs. deque (access)
vector vs. deque (push_back + access)
Associative vs Hashed Associative (Finding random integers)
compiler vs. programmer vs. hand- optimized
Lessons learned (Algorithms)
Lessons learned (containers) optimizing destructor of string
Lessons learned (Language/Library)
Size (in bytes) of empty containers 64 bit
Optimize for latency

Taught by

CppNow

Reviews

Start your review of Performance Analysis and Optimization of C++ Standard Libraries

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.