Compiling optimization in VC++ function returning an object value
Liang Mao-sheng · Journal of Southwest University · 2005
In most cases, when a C++ function returns a value without using reference technology, the value is passed to the calling level variable by copying in memory. However, in Visual C++ and under certain conditions, the compiler will optimize a function returning an object value without using reference technology. The optimization can reduce or avoid copying of the object, so the executing efficiency of the program gets improved.