~/talk

C++11 to C++23 in the C++ Memory Model

Talkat C++Now 2024 · 2024-04-29..05-03· [concurrency, compilers-and-language-design]
links:none on file
slides:none on file

Covers concrete differences from C++11 to C++23: shows compiled assembly on x86/ARM/RISC‑V to prove compilers and CPUs reorder code, demonstrates that volatile is not synchronization and is deprecated in C++20, and explains why consume is effectively unusable on most ISAs. Walks through practical builds: a spinlock using atomic exchange, a scheduler using std::jthread + stop_source, semaphore/latch/barrier examples, and a microbenchmark playground that shows pthreads, threads and jthreads have similar performance; recommends sanitizers that catch ~90% of multithread bugs.

AI-written summary · about

  1. 0:00Introduction
  2. 2:42Compiler optimizations
  3. 17:23CPU architecture
  4. 24:50Memory model basics
  5. 29:45Multi-threading challenges
  6. 35:10Volatile keyword
  7. 38:13Memory ordering and fences
  8. 1:02:20Practical C++ concurrency tools
~/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.