Friday, 11 May 2012

The Return Value Optimization


Anytime you can skip the creation and destruction of an object, you are looking at a performance gain. In this chapter we will discuss an optimization often performed by compilers to speed up your source code by transforming it and eliminating object creation. This optimization is referred to as the Return Value Optimization (RVO). Prior to delving into the RVO we need to understand how return-by-value works.

0 comments:

Post a Comment