2 ms·
The effects you describe are mainly caused by copy elision (https://en.m.wikipedia.org/wiki/Copy_elision https://en.m.wikipedia.org/wiki/Copy_elision) While mov
by jupp0r 11y ago
The effects you describe are mainly caused by copy elision (https://en.m.wikipedia.org/wiki/Copy_elision https://en.m.wikipedia.org/wiki/Copy_elision) While move semantics certainly improve performance, they are still expensive in many cases, and it's very hard to make assumptions on their performance without detailed measurements.
The problem with copy elision is that it's an optional compiler optimization and you have to check if the compiler applies it to you particular piece of code. That doesn't scale for large code bases (nor for small ones imho).