~/talk

C++ Trivial Relocation Through Time

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp, compilers-and-language-design]
links:none on file
slides:none on file

Argument: letting containers legally relocate objects by copying bytes instead of calling move+destroy lets implementations replace per-element move loops with a single memcpy, cutting vector growth cost — a quick benchmark on std::string shows 2.8× speedup. Multiple WG21 proposals (N4034, P0023, P1029, P1144, P2786) and library hacks (Facebook Folly, Bloomberg BDE) exist; reference implementations and a Silang-based stdlib variant demonstrate feasibility but the change requires a lifetime-model fix to avoid current undefined behavior for trivially relocatable types.

AI-written summary · about

  1. 0:00Introduction to speaker
  2. 1:00Agenda and motivation
  3. 1:42Vector growth mechanics
  4. 3:54C++11 move constructors
  5. 5:09Memcopy benefits
  6. 7:28Trivially copyable types
  7. 10:08Defining trivial relocation
  8. 12:56Third-party library usage
  9. 15:04Standard library pitfalls
  10. 17:43Value of language support
  11. 19:43History: Pablo's proposal
  12. 25:18History: Denny's proposal
  13. 30:04History: Niall's proposal
  14. 35:05Ongoing efforts
  15. 39:02Commonalities and traits
  16. 44:30Differences and challenges
  17. 57:40Conclusion
  18. 1:00:03Q&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.