Video details

Taking a Byte Out of C++ - Avoiding Punning by Starting Lifetimes - Robert Leahy - CppCon 2022

10.13.2022
English

https://cppcon.org/ ---
Taking a Byte Out of C++ - Avoiding Punning by Starting Lifetimes - Robert Leahy - CppCon 2022 https://github.com/CppCon/CppCon2022
Marshaling raw bytes into objects is a perennial problem in C++. Bytes may exist in memory, we may know they’re of the correct form to back a C++ object, but the abstract virtual machine says none of the desired objects exist at that location. The temptation to type pun and hope that happens to work, and continues to do so, runs strong.
What if we had start_lifetime_as? We could synthesize objects backed directly by bytes without superfluous calls to memcpy/memmove and prayers to the optimizer. What would that world look like? What sort of patterns could we use to work efficiently and correctly in that world?
This talk answers such questions against the backdrop of a database engine which makes use of this proposed functionality. Analysis will move from raw bytes, to C++ objects, to heterogeneous streams of such objects with discussion of the sharp edges at each level. End to end zero copy will be shown to be both possible and correct. ---
Robert Leahy
Robert is a graduate of the University of Victoria where he specialized in graphics, gaming, and digital geometry processing. After spending 4.5 years in full stack web development he pivoted to financial infrastructure in early 2016 and now works on next generation market data storage and retrieval mechanisms. In 2019 he became involved in the ISO C++ committee with a particular focus on library evolution. __
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
#cppcon #programming #cpp