~/talk

C++ Memory Model: from C++11 to C++23

Talkat CppCon 2023 · on Friday, 2023-10-06· at 10:30· Adams, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Covers concrete changes since C++11 with code and disassembly showing where naive code breaks and what actually works: examples where memory_order_relaxed fails and acquire/release fences fix it, x86 and RISC‑V assembly that proves the compiler emitted atomic instructions, spinlock and compare_exchange examples, microbenchmarks showing std::jthread performance similar to pthreads, and new C++20/C++23 tools like std::jthread and stop_token and std::atomic<std::shared_ptr> with notes about lock‑free vs locked implementations.

AI-written summary · about

  1. 0:00Introduction
  2. 2:13Processor execution vs program
  3. 3:17Compiler optimizations
  4. 8:12CPU out-of-order execution
  5. 15:13C++ memory model
  6. 18:49Sequential consistency
  7. 22:19Volatile not for sync
  8. 24:48Memory barriers
  9. 28:43C++11 threading tools
  10. 32:53Atomic operations
  11. 35:48Atomic performance
  12. 38:15C++20 atomic shared pointers
  13. 39:00Futures and promises
  14. 41:30C++20 jthread
  15. 43:17Latches and barriers
  16. 48:15Static initialization
  17. 51:25Lazy threads
  18. 52:48Atomic usage
  19. 56:24Q&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.