Summary
Jason explores C++17's Polymorphic Memory Resources (PMR) to significantly improve container performance. He demonstrates how to use std::pmr::monotonic_buffer_resource with standard containers to replace multiple heap allocations with a single stack allocation. Through benchmarks, he shows PMR containers can be up to 3.6x faster than their standard counterparts for node-based containers like std::list, and 2.3x faster for std::vector when creating multiple containers. The episode highlights how PMR addresses allocation costs in node-based containers like std::list, std::map, and std::unordered_map.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[diff.cpp03.containers]63% match -
[list]40% match -
[mem]40% match -
[unord.map]40% match