[Home Page] - [Reviews Main] | |
| Zen and the Art of Code Optimisation by Michael Abrash |
| ISBN: 1 883577 03 9 Publisher: Coriolis Group Pages: 450pp&disk Price: $39-95 |
| Categories: internals and hardware assembler |
| Reviewed by Chris Hills in C Vu 9-5 (Jul 1997) |
The whole Intel PC range from 8088 to the Pentium is covered. Also the Pentium's V-pipe. If you need to ask what a V-Pipe is then this book is probably not for you. The text works its way through the processors, looking at the known 'cycle eating' areas and suggesting ways to deal with them. The book is full of tips and examples like 'If any byte register is loaded and then 2 cycles later any register is used to point to memory, 1 cycle is lost. So for example...'. It is up to you to work out how and when to use these snippets in your own work.
Speed increases are given in cycles and also using a supplied precision timer. It is a library for linking into one's own code. This is an actuate timer with a range of up to 54 milliseconds that can be used to measure performance improvements. 54 ms may not sound long but it highlights the tone of this book, it looks very closely at small parts of code to save cycles. Also included on the disc are several versions of the game of life to illustrate various points.
I think experienced assembly programmers may take to this book. The average C coder will not because, as the book shows, to make real speed increases one has to drop into correctly optimised, hand-crafted, assembler. There is not enough C++ in it to interest the C++ community. I found the book interesting to read but I did not take to it despite enjoying assembly programming and as the previous reviewer did not get on with it either I do not think it is a book I would recommend.
To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/z/z001445.htm
Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.