march Unlimited cloud storage boutiques-francophones SmartSaver Furniture Introducing Kindle Oasis Music Deals Store sports Tools Family

Customer Reviews

4.5 out of 5 stars15
4.5 out of 5 stars
Format: Paperback|Change
Price:$38.93+ Free shipping with Amazon Prime
Your rating(Clear)Rate this item

There was a problem filtering reviews right now. Please try again later.

on July 27, 2002
Bentley's classic, "Programming Pearls", makes an important point, namely that you won't get good performance without careful coding and profile-based tuning. And it's made clearly, concisely and with compelling examples. The choice of language (C), and the choice of problems (those from computer science 101 we all think we know cold) betrays the sophistication of Bentley's analyses.
Suppose, for the sake of argument, that you have a binary search that's holding up your loop. Or your Huffman coding just isn't snappy enough? "How is that possible?", you might say, fresh out of computer-science 201, "Didn't we just prove these algorithms are optimal?" Well yes, asymptotically up to an arbitrary constant multiplier. But this is the real world, and your code needs to go faster. If this sounds like your predicament, pull up a chair and read "Programming Pearls"; if it's not, you might wonder what all the fuss is about.
Next, fire up your favorite hardware (Sparc or x86 or PowerPC), favorite language (Perl, Java, or even C), favorite release of that language, along with your favorite interpreter or compiler (Hotspot or standard? GCC or Visual C++). And you'll need a profiler; might as well treat yourself to a good one if you're serious. Then fire up your code with a representative range realistic test data and observe what happens. Function by function, byte by byte. Then try to be as clever as Bentley in (a) figuring out why, (b) trying a range of alternatives, and (c) making it all go faster with minor tuning. Typically, you'll find a single bottleneck taking an order of magnitude more time than everything else, and work on that. Repeat until fast enough.
As well as this simple, yet surprisingly effective and realistic methodology, Bentley provides a range of concrete tips on making things go faster, from tweaking data structures to unfolding loops (especially precomputing low-order cases) to using accumulators and caching, all with an eye to underlying memory, communication and CPU resources.
Real code that has to run fast, like the code that we write at my current company for signal processing, speech recognition and speech synthesis, typically looks like the end-product of Bentley's refactorings. And it gets that way following exactly the path he lays out: analyze the problem, choose the right algorithm (or the right few to evaluate), and then tune it up using profiling.
"Programming Pearls" is the beginning of the road. You will need to look elsewhere for topics such as compression for memory saving, numerical algorithms, effective concurrency and memory sharing, efficient buffered I/O, garbage collection, and the wide range of dynamic programming and heuristic techniques.
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on November 28, 2014
Needed for college and Amazon had it.
0Comment|Was this review helpful to you?YesNoReport abuse
on September 12, 2002
The book wa interesting to me as the collection of stories about programming and problems that programer can meet in his work. the solutions in the book are brilliant.
On the other hand, I don't lik that book treats some very specific problem areas, which are unconnecet mutually. Secondly, there are many things in this book which are completely out of date. I don't want to say that they are completely unimportant, but there are things in modern programming that are much more important and in wich you can improve your program much more.
I read this book, as I said before, as collection of funny and interesting stories.
0Comment|Was this review helpful to you?YesNoReport abuse
on December 24, 2003
This book is amazing! Its a true classic on algorithims.
I would place this on my list of the top 5 programming books of all time. A must read for every who calls themselves a "programmer".
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on September 22, 2002
I only have 2 years of programming experience. I read an awful lot of programming texts. Right now I have 10 books just on C itself. Not to mention all the java and C++ books... My point to saying this is, if you've already read as many books as I have, this book will do nothing for you. I read this book over the weekend and was just astonished with how simple minded it all was. I constantly said "Duh..." throughout the entire book. The pseudo code in this book was the worst I've ever seen. I have never returned a book before except for "Linux Socket Programming". I returned this one today.
The reason I did give this book 3 stars was because I can see it being extremely great for uneducated newbies. It will teach them a great deal and have them think about efficiency and general good programming practices.
I was amazed at all of the great reviews I saw with this book. Everyone that gave a review must of been new to computer programming. I was personally expecting a few more advanced topics such as real C and C++ code. Not the .... pseudo code that this author insisted on using.
Overall, this is a great book for neophytes. If you're new to programming, get this book and give it a good once over. Don't pay attention to his style though... As he stated in the book, it's due to the constraints on space and the fact he didn't want to write a 1200 page book. However, if you have gotten to the point where you've studied advanced data structures and algorithms and know what a linked list is and a binary tree and you understand the concepts behind a heap, priority queues and such, I'd go for another book that is going to advance your knowledge, not bring it back a step.
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse