Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!
by Steven Pigeon
Summary of the talk:
When we code, we often assume that the computer has an infinite amount of memory. This is, of course, /very/ false. It is false for embedded programming, where memory is often limited to a few megabytes or even a few kilobytes, but it is also false for the most powerful workstations and servers. Using memory wisely makes your application possible on small systems as well as prevents, or at least reduces, scaling problems for larger applications. While some programming languages are designed to hide implementation details from the programmer, C++ allows the programmer to specify, with a good level of control, how memory is allocated, structured, and used. In this talk, we will explore what can be done at run-time with negligible cost, what can be done at compile-time with meta-programming, and how we can thwart default compiler behavior to achieve memory-efficient type-safe data representations. We will also extend the discussion to the higher-level reorganization of data structures in order to make a better use of memory.