Updates

Latest Tweet



What's New?

Check out for latest innovation, a computer based training video collection


Like this Page

Efficient C++: Performance Programming Techniques Review by David Elder

Valuable information, but far from complete

Bulka and Mayhew's "Efficient C++" is an enjoyable and useful book, filled with helpful information that can be immediately applied to C++ programming. Its coverage of techniques for inlining, achieving the return value optimization, and avoiding temporary object creation is quite good. I also found the second chapter, which presents a case study about writing a tracer class, to be informative and a tidy overview of efficiency methods. There are also chapters discussing virtual functions, memory pooling, STL, and efficiency at the implementation and design levels. One helpful feature of this book is its presentation of a number of bar graphs illustrating the runtimes of actual test code. This helps to hammer home just how efficient or costly various techniques actually are.

Unfortunately, there are a number of topics which are not discussed or are only briefly discussed. The chapter on the STL, while accurate, is very incomplete. I would recommend bolstering this information with Meyers' "Effective STL". Also, different compilers implement different optimizations. It would have been nice to see a discussion of the optimizations provided by the most popular compilers, as well as tips on how to use these features effectively. The C++ standard allows compiler implementers to ignore certain keywords (register and inline) and to provide optimizations such as the return value optimization. I would have liked to have seen a discussion of the optimizations actually provided by various compilers as well as how they relate to the C++ standard. In addition, there are some advanced techniques, such as the Barton-Nackman trick, for avoiding the cost of virtual functions. Unfortunately, this and other comparable methods are not discussed.

On the whole, this book provides a lot of valuable information, but it could have been much more complete.