As I'm interested in writing high-performance code, I wanted to ask any of the code optimization gurus in here if the may recommend a good book on code optimization to me. I've looked at the Inner Loops book by Rick Booth, and its supposed to be pretty good, however, its a bit outdated. Any more recent books on this topic?


Posted on 2002-05-17 08:57:54 by PredeX
I have never seen a book on code optimization. Mostly, I am of the mind that experience with the instruction set and algorithms leads to greater understanding of code optimization. Code optimization is a minimization problem: minimize the data accessed, minimize the operations on the data. The constants in the code are exploited to perform transformations in logic. Then again, maybe I'm missing something - hope someone else posts info on some books... :)
Posted on 2002-05-17 09:33:12 by bitRAKE
What about Agner Fog? My copy is in help file format, but it's more like a small book than a help file! I think... it came with the masm32 package from Hutch? Not sure...Anyway, pentium info on pairing, cache, dependencies, and stuff.
Posted on 2002-05-17 11:55:08 by Bighillwill
"Zen of Assembly Language" by Michael Abrash.

It's from 1990 and Abrash focuses on the 8086/8088 and only talks bout the 80386 in places but I think it's still worth reading (at least worth a quick scan in your local library).

Most people would argue that optimizing algorithms to save a couple of cycles isn't worth the effort but there are cases where it's warranted. This book will get you thinking about different ways to save cycles and space when you need it most.
Posted on 2002-05-20 16:15:40 by northcode