Encoding unit — one grounded idea

1 The compiler may optimize reference captures by reusing pointers or using offsets to reduce memory usage.
“for example if you catch two variables by reference but you only ever use one at a time you use one and then later use the other uh it can reuse the same pointer or for example if the variables are close to each other it can instead of storing two pointers and can store one pointer and then use like an offset or something like this”
spoken · 671s · 2022-11-10 · en · CppCon · C++ Lambda Idioms - Timur Doumler - CppCon 2022
id: 3203e2fe049a2cbc
concepts in this idea