~/talk

Basic usage of PMRs for better performance

Talkat Meeting C++ 2022 · 2022-11-17..11-19· [web-performance]
links:none on file
slides:none on file

Shows concrete payoff: use std::pmr to replace many small heap calls with a stack-backed slab or pooled blocks and cut allocation overhead; monotonic_buffer_resource gives bump-pointer speed for short-lived builds, pool_resource reuses fixed-size blocks for hot data, and the library falls back to new_delete_resource when exhausted. Notes gotchas: containers must not outlive the naked resource pointer and strings must be pmr::string to forward allocations. Cites real wins in XML parsing and game code.

AI-written summary · about

  1. 0:00PMRs introduction
  2. 1:05Memory allocators overview
  3. 8:57C++ allocator support
  4. 10:44PMRs in C++17
  5. 11:52Polymorphic memory resources
  6. 18:59Standard PMR types
  7. 20:23Monotonic buffer resource
  8. 26:10Pool resource use
  9. 32:18PMR usage scenarios
  10. 39:38Arena allocation advanced
  11. 44:00jemalloc overview
  12. 51:20PMRs vs jemalloc
  13. 57:10Conclusions
  14. 1:03:22Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.