O'Reilly logo

Efficient C++ Performance Programming Techniques by David Mayhew, Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Temporaries

In the large collection of performance issues, not all issues are of equal weight. The significance of a performance item is directly proportional to its cost and the frequency with which it appears in a typical program. It is conceivable that you could write highly efficient C++ code without having a clue about the intricacies of virtual inheritance and the (small) influence it has on execution speed. The generation of temporary objects, on the other hand, definitely does not belong in the category of potentially low-impact concepts. The likelihood of writing efficient code is very small unless you understand the origins of temporary objects, their cost, and how to eliminate them when you can.

Temporary objects may come ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required