Chapter 12. Optimization

 

The compilers giveth, and the compilers taketh away; in the end we are just bits twiddling in the jaws of the virtual machine; waiting to execute our little nuggets of logic on an always too-slow meta processor.

 
 --George Frazier, esteemed software engineer and part-time space cadet, 2003

In Chapter 2 we looked at various things that the C++ compiler adds in implicitly if you do not specify your own, such as constructors, copy operators, new and delete operators, and so forth. In this chapter, I want to look at the other side of the coin, and discuss some of the things the compiler takes away for you. Naturally, this is not a full discussion of optimization per se—for that you should look at several good books listed in ...

Get Imperfect C++ Practical Solutions for Real-Life Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.