~/talk

“Instruction Re-ordering Everywhere: The C++ 'As-If' Rule and the Role of Sequence"

Talkat CppCon 2016 · 2016-09-18..09-23· [concurrency]
links:none on file
slides:none on file

Claims that C++ gives the compiler and CPU carte blanche to reorder instructions as long as logical dependencies hold and observable results match; cites As-if rule (Section 1.91) and shows concrete examples: a mouse highlight function refactored (row/column computations reordered) and still produces correct output because operator precedence, associativity and static single assignment reasoning preserve values. Explains runtime actors (compiler optimizations, CPU OOO execution, cache-line effects) and the practical rule: add explicit dependencies (atomics/fences) to fix undefined behavior.

AI-written summary · about

  1. 0:00Introduction to instruction reordering
  2. 3:07Key takeaways on dependencies
  3. 10:35Sequence vs algorithm in C++
  4. 17:13Assumptions in design and pizza example
  5. 23:28Requirements and constraints influence order
  6. 28:47Imperative vs sequential devices
  7. 32:37Physical vs logical sequence
  8. 38:55State and dependencies in code
  9. 43:50The C++ 'As-If' rule explained
  10. 47:43Focus on dependency management
  11. 51:57Q&A on reordering granularity
~/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.