~/talk

Aliasing in C++ - Risks, Opportunities and Techniques

Talkat CppCon 2022 · 2022-09-11..09-16· [web-performance]
links:none on file
slides:none on file

Examples show real failures: a naive loop-copy breaks overlapping buffers, std::memmove survives but strcpy/copy_n are undefined in those cases, and compilers differ (Clang vs ICC). Passing a coefficient by value lets the compiler hoist and vectorize and yields 32× faster results on QuickBench. Practical fixes include memmove/move algorithms, strong typedefs, execution policies, and optional pass-by-value policy dispatch. A union-based layout trick appears to work on some compilers but is effectively UB and not portable.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10What is aliasing?
  3. 9:26Aliased buffers
  4. 13:17STL algorithms aliasing
  5. 22:24Performance implications
  6. 23:03Summary of aliasing issues
  7. 24:21Aliasing in C and languages
  8. 34:17C++ strict aliasing rules
  9. 34:55Mitigation strategies
  10. 37:29Future of aliasing in C++
  11. 50:19Conclusion
~/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.