Home
Fractals
Tutorials
Books
My blog
My LinkedIn Profile

BOOKS i'm reading

Napoleon Hill Keys to Success: The 17 Principles of Personal Achievement, Napoleon Hill, ISBN: 978-0452272811
The 4-Hour Workweek: Escape 9-5, Live Anywhere, and Join the New Rich (Expanded and Updated), Timothy Ferriss, ISBN: 978-0307465351
The Fountainhead, Ayn Rand, ISBN: 0452273331
Web Hosting Canada

mailto:olivier@olivierlanglois.net

Inner Loops: A sourcebook for fast 32-bit software development

06/05/07

Permalink 09:24:47 pm, by lano1106, 415 words, 2611 views   English (CA)
Categories: Code Optimization

Inner Loops: A sourcebook for fast 32-bit software development

Inner Loops: A Sourcebook for Fast 32-bit Software Development, Rick Booth, ISBN: 0201479605

It has historical value more than anything else...

This book is divided in 2. The first part describes the theory of assembler optimization for processors from the 486 to the Pentium Pro. 10 years ago, this information was useful but now it is pretty much deprecated as I highly doubt that Pentium optimization techniques do anything good on Athlons or Pentium IV processors. The only chapter that still contains applicable information today is the one providing general advices on optimization such as loop unrolling.

Then the second part named 'Practice' provides concrete examples of assembly optimizations for various problems such as sorting, list and tree traversals. I do not like this section neither because I feel that the presented assembly procedures are thrown at you in the face without showing you the process that the author used to derive them from the original C code. Michael Abrash's Graphics Programming Black Book does a much better job in that area by presenting you 5 versions or more of the same procedure starting from the C version that gets optimized further at each iteration. Also, someone might expect to be able to get the source from the CD-ROM coming with the book and start directly using it. Alas, it is not possible because what the presented code is sorting or searching in binary trees are integers that are directly manipulated in the registers (that is part of the presented optimizations) which has not much reuse value in a world of STL containers holding usually much more complex objects or structures than plain integers. The only value that these examples might have is that they might give you some ideas on where assembly optimization might be applied.

A much better book to learn the process of optimizing in assembly is Michael Abrash's Graphics Programming Black Book because it walks you through the optimization process step by step with more than 5 versions of the same procedure that is getting more optimized at each iteration. You will learn how to do it yourself with this book even if it suffers of the same weakness than this book. That is: it presents optimization techniques from the 8088 (that is very very old up!!!) to the Pentium Pro. Another benefit from Abrash book is that, in my opinion, there is a greater chance that you might find its code reusable.

Finally, a very good optimization book that covers optimization techniques for recent processors such as the Athlon and the Pentium IV is: Code Optimization: Effective Memory Usage.

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

This post has 1 feedback awaiting moderation...

Comments are closed for this post.

Olivier Langlois's blog

I want you to find in this blog informations about C++ programming that I had a hard time to find in the first place on the web.

October 2024
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search

Custom Search

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 4

powered by
b2evolution