Small is beautiful: Techniques to minimise memory footprint - Steven Pigeon - CppCon 2019

preview_player
Показать описание


Small is beautiful: Techniques to minimise memory footprint - Steven Pigeon - CppCon 2019

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.


Steven Pigeon



*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

This is just great stuff, and so clearly explained to my smart yet simple mind. Can't wait to find some measurable effect using some of these techniques in this era of caches and low power. Merci, vraiement.

HarlowBAshur
Автор

Not sure If I would these techniques but good to know that that they exist. I would have liked to see some benchmarks though!

sreegowthamjosyula
Автор

The techniques are interesting. I would however look more closely at the data structures I was using before I start optimizing the definition of a pointer. Nice talk.

PeterPetrakis
Автор

Nice talk so far but to be honest only an academic would assume people play as if memory is infinite. Any well engineered production code never makes that assumption and you would be laughed out of the room for even saying “the average person assumes memory is functionally infinite.”

Only in a space where you’re not writing code to be shipped, like academic problems or side projects, would anyone I know be caught dead uttering those words.

michaelthompson