Tags

#Copy-Elision

1 post

Low-Latency Systems Development #11 10 min read

Return Value Optimization and Pure Functions

Returning a struct by value is usually free, so there’s no need for out-parameters; what to watch are the few patterns that always move or copy. Pure-function attributes are a promise to the compiler: right, and it calls less; …