Rating:  Summary: Valuable information, but far from complete Review: 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.
Rating:  Summary: Valuable information, but far from complete Review: 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.
Rating:  Summary: important information for any serious C++ developer Review: Few C++ books talk about such important aspects of programming like design and development for performance, as well as performance tuning. Even smaller number of them support their arguments with the actual test numbers. This book is different: on many occasions the authors show quantitative difference between techniques, which is very useful for understanding the trade-offs and is much more convincing than simply referring to common sense or authors' past experience. This book is a well-written overview of the C++ performance programming techniques. It looks into a broad spectrum of the issues, some of them are examined in a great detail, like C++ inlining. Most often there is no free lunch in software development, and the book does a good job of showing the trade-offs of performance techniques, keeps a good balance of not advocating extra efforts simply for the sake of having faster programs. The book has many coding examples that show "side-by-side" performance of different code snippets trying to achieve the same computational goal. The examples are very simple and are independent off each other, so one does not have to read all the previous chapters to understand a point made in the middle of the book. Elegance usually goes hand-in-hand with good performance, so if you are just a beginner in C++, this book will help you to polish the patterns of your programming style. I think that this book will be helpful to any C++ programmer, especially to one who is writing real-time or performance intensive applications. I wish the management could read and understand it too: hopefully then it wouldn't assume that "performance profiling" is just an afterthought and is not a necessary entry in the schedule for every serious product.
Rating:  Summary: A great (and underappreciated) book Review: First off: it's practical! It's based not on some tenured professor's abstract hifalutin vaporous gobbledegook but on personal, actual, concrete experiences of the author. A pleasure to learn from. Well written too! Which can't be taken for granted anymore. The book is appropriately titled (rare as well.) To make it short: if you're interested in efficiency with C++ that's the book to buy, w/o thinking, right off the web. Satisfaction guaranteed, even, btw, if you don't particularly care for efficiency but are an in-general curious C++ programmer. Being a ninkompoop and a cantakerous, argumentative [person] that I am, I rarely praise anyone, as you can figure from my name, but this book gets a triple-A, ten stars from me. I'm watching this author from now on, on par with Meyers, Richter, and Stevens.
Rating:  Summary: Sloppy information mars book. Review: I don't know about every topic in the book but for those where I have good information the book was wrong. As a rule of thumb I assume the things I don't have special knowledge about are about as good or bad as the things I can check. It discussed Reference counting in depth. I'm a garbage collection professional and have all the details. Reference counting is a very poor method, it triggers paging by touching the dead, traversals do work. It discussed caching and again I have professional knowledge. Things are very different from machine to machine. Cache synonyms are crucial. So on one machine you will want to have objects a power of two size to keep them in cache lines and on another avoid power of two sizes to avoid cache synonyms. In the end if you care you have to measure.
Rating:  Summary: Very Helpful Overview of Performance Issues Review: I found this book to be quite helpful as a guide to areas in which C++ performance may be an issue. I was surprised by the vast difference in speeds caused by choice of allocation method, or how drastically the use of a C++ string object in a simple profiling class changed its performance (for the worse) compared to a character pointer. No book is perfect, but I think the prior reviewer's 1-star rating is overly harsh. I use C++ professionally every day, and have read many of the canonical books on the topic. I still found several items worth learning from this book.
Rating:  Summary: Recommended, with reservations Review: I thought the book a useful compendium of performance information, as far as it went: temporaries, constructors and destructors, virtual functions, inlining, reference counting, some STL, multiprocessor scalability, and system architecture dependencies. My reservations are the number of omissions (most of the Standard Library, space efficiency, exceptions, performance measurement, etc.) and the number of typos.
Rating:  Summary: An efficient way to come up to speed on C++ efficiency. Review: I was really pleased to find this book at Borders. When I saw the title I thought that this was the book we were really missing among other excellent books on C++. The style is extremely clear and the text is accessible, even to programmers who are not C++ experts.The diagrams are just adequate , complementing the text in a concise way. The example code, coming from the trenches is well chosen and is not artificial or bulkier than necessary for a book. It is an easy to read, even on the plain or train or in your "copious" spare time. It is a must read for the serious C++ programmer, trying to improve their C++ knowledge.
Rating:  Summary: Keys to acceptable C++ performance Review: The authors are developers of network and web server software for IBM. They specifically target performance issues related to C++ programming. The primary topics of discussion are constructors & destructors, virtual functions, return value optimization, temporary objects, inlining, memory managers, and reference counting. Learn how to create efficient constructor functions. Learn how to avoid the costly construction of temporary objects. The authors promote "lazy evaluation" and nail "useless computations" and "obsolete code." Algorithm and data structure discussions are referred to other standard references, however there is coverage of the STL structures (insertion, deletion, traversal, and find operations). An additional bonus is the excellent coverage of multithreading issues.
Rating:  Summary: When efficiency matters, which is always, read this book Review: There are two different categories of efficiency considerations: those that you do because they are necessary and those done only when necessary. The first category consists of those changes that make the code run faster and cleaner, whether it be on a silicon or carbon based CPU. The second category becomes significant when, no matter how clean your design and completion of the first category, the hard requirements are such that the executable just does not perform to the velocity specifications. This second category is where the danger lies, because changes here often are at the expense of portability, readability or maintainability. The first category are all no-brainers, while the second will often cause headaches, either now or in the future. Both categories are fully represented in this book, and even in the age of gigaflop desktop devices, the first should be implemented with all the due regard of a religion. For many of them save more than just clock cycles. In so many cases, the result is code that is much more elegant and easier to read, which translates into long-term savings. C++ is a very flexible, powerful language, but it does have some significant inherent performance hazards. Constructor calls are automatically generated by C++ compilers in many places where you would not on first pass suspect them. I have been teaching and writing C++ code for almost a decade and there were some that I had not thought about. However, once noted, they are relatively easy to avoid, a point where the authors are very clear. This feature alone is enough for managers to buy copies for all C++ developers and use the examples in this book to construct company wide coding guidelines. The second category is of course more problematic, but we all know that it happens. If you are ever in the situation where you must optimize further, even at the cost of portability and future maintenance, then you will appreciate the strategies enunciated in this book. Of the many C++ books that I have read in the many years that I have been working and reviewing, I firmly believe that this one may be the most valuable. Efficient code is still very important and in less than three hundred pages, the authors give you a plan that may save you precious body parts.
|