Reputation: 30765
C++11 has introduced move semantics
and rvalue references
to prevent unnecessary copying of temporary objects. My question is, is there any study or paper which shows the improvement move semantics
have over C++ code not using it.
Some areas where I think it improves performance is in string handling and scientific libraries which use operator overloading. But didn't we already have high performance scientific libraries, such as blitz++ that existed even before C++11. Maybe, by the use of move semantics
, it can be optimized even further.
What do you think, which kind of applications will greatly benefit with move semantics
and rvalue references
?
Upvotes: 0
Views: 509
Reputation: 24561
Pretty much all applications that use the C++ Standard Library will benefit from move semantics without doing anything extra. For instance, take a look at vector<string>
- move semantics will make the cost of adding new elements and growing the vector dramatically lower.
Upvotes: 1