Brain Dump

Copy Elision

Tags
lang-design

Is a compiler optimisation technique where the return value of a function isn't copied into the memory of the caller function, instead the address of the object in the called function will be equivalent to the address in the caller function.

This works relatively well for basic functions where the control flow is predictable, but for more complex or involved routines copy elision may not be applicable.