In Book Review / Tags: performance, reading /
You might be thinking to yourself, “The Software Optimization Cookbook? Awesome. Another of those O’Reilly Cookbook formatted reads where each ‘recipe’ is a problem and solution.”
Wrong!
This is a book about Software Optimization and a Cookbook. If you want some slightly outdated information on optimization and a killer recipe for Turkey Lasagna, this is the book for you. That’s right. I am not joking when I tell you that part of this book is a collection of recipes for food, not software optimization. The book is broken down into sections based on bona-fide recipes starting with appetizers, moving to entrees, and then finishing up with desert. Let me give you a piece of advice. This book is like one of those restaurants with sub-par meals. Skip dinner and get dessert!
Let’s start with the appetizers. In the first 57 pages, you’ll find a few nuggets of optimization knowledge and an obvious advertisement for vTune. This makes sense, considering the book is published by Intel Press. Let me save you a bit of reading. Benchmarks are repeatable, representative, easy to run, verifiable measurements of a program. Also, hotspots are the worst (slowest, most memory usage, most cache misses, etc) spots in the program and must be fixed before optimizing much else, because they are the biggest potential gains. Not much else is in this section of the book besides the recipes for a soup, a salad, some crab cakes, and meatballs.
Now on to the main course. There must be some juice optimization information here, right?
Wrong!
Yes, it does explain some of the reasons performance could be slow. Does it go into depth about how to fix it? Not really. Does it show you how to identify these situations with screenshots from vTune Performance Analyzer? Of course! Does it show you Intel chipset specific compiler flags that you can use for optimizing some of these situations for Intel processors? Of course! This makes sense, considering the book is published by Intel Press.
Honestly, if your program is slow enough that you need an Intel compiler flag, or you need to start writing inline assembly, you need to refactor or rewrite something a bit. In this day and age, readability is important as well. As our processing power advances, so does our ability to write clear and concise code. We rely more and more on high-level scripting languages. What we don’t need in our code is some cryptic, archaic _asm blocks. I learned much more about avoiding cache misses in these slides, than I honestly did from the entire book.
Now on to the delicious part, dessert. Dessert in this book consists of gooey brownies, grilled bananas, mixed berry cobbler, and a dash of how to apply any of this stuff we’ve been learning. This time, you will actually get a great use case of how to use vTune Performance Analyzer. Here, it goes over a use case and in some cases, the author actually optimized the algorithm instead of adding some inline assembly.
Unfortunately, it feels a little late. Honestly, how does this book have five star reviews? Check this one out at the library or spend an hour at the Starbucks at Barnes and Noble. Text books are entirely too expensive to be taken lightly! I don’t think you’re missing out on much if you skip this one.
3 ResponsesLeave a comment ?
The book is indeed awful. Review is spot-on.
Thanks for the review. I think I have said book, mayhaps I will have to skim it or something. Are the recipes at least tasty?
For me, the recipes carry the same recommendation. Skip dinner and try dessert. The meals aren't plain enough for me.
Also, why did I select the book? For the same reason you would skim it (publishers, take note.) I was given the book for free. I checked out the reviews and they were all five stars, so I figured it was worth the read. Maybe to someone who didn't take a machine architecture class or studied processors might find it a little more useful (even if a tad outdated.)