Michael Abrash - Technical Writer

Technical Writer

Michael Abrash was a columnist in the 1980s for a magazine called Programmer's Journal. Those articles were collected in the 1989 book Power Graphics Programming.

His second book, Zen of Assembly Language (1990), focused on writing efficient assembly code for the 16-bit 8086 processor, but was released after the 80486 CPU was already available. A planned second volume about graphics programming never appeared. The key point of Zen of Assembly Language was that performance must always be measured, and the book included a measurement tool called the Zen Timer to check if theoretical code optimizations actually worked.

Much of the content of Zen of Assembly Language was updated in Zen of Code Optimization: The Ultimate Guide to Writing Software That Pushes PCs to the Limit (1994), along with new material. The presentation of stepwise program refinement empirically demonstrated how algorithm re-design could improve performance up to a factor of 100. Assembly language re-coding, on the other hand, may only improve performance by a factor of 10. Abrash also showed how elusive performance improvement can be. Simply improving performance in one subroutine would expose bottlenecks in other routines and so on. Finally, he demonstrated processor-dependent assembly-based performance improvements by comparing assembly language optimizations across x86 family members.

Another lesson Abrash offered was how hard-earned performance rewards by such micro-optimizations could disappear or even make the program execute slower. Abrash was able to gain performance by carefully counting clock cycles of each instruction and ordering instructions in such a way that they used a minimal number of clock cycles. However, the number of clock cycles per instruction changed with new implementations of the x86 architecture and, as a result, his performance gains were lost from one generation to the next. For example, the bit-oriented "XOR EAX, EAX" (example in Intel assembler syntax) instruction was the fastest way to set a register to zero in the early generations of the x86, but most code is generated by compilers and compilers rarely generated XOR instructions, so the IA designers decided to move the frequently occurring compiler generated instructions up to the front of the combinational decode logic, making the literal "MOV EAX, 0" instruction execute faster than the XOR instruction. Still, carefully hand optimized assembler code will in general perform well on later x86 processors, even without retuning for the new architecture. The reason is that the optimization policies change only gradually between the architectures, so that many optimization assumptions valid for the original architecture still hold on the new architectures, for example "integer arithmetic is significantly faster than floating point arithmetic" or "minimize memory accesses for maximum register usage".

In 1997 Abrash's Graphics Programming Black Book, was published. It was a collection of his Dr. Dobb's articles and his work on the Quake 1 graphic subsystem.

Read more about this topic:  Michael Abrash

Famous quotes containing the words technical and/or writer:

    When you see something that is technically sweet, you go ahead and do it and you argue about what to do about it only after you have had your technical success. That is the way it was with the atomic bomb.
    J. Robert Oppenheimer (1904–1967)

    How simple the writing of literature would be if it were only necessary to write in another way what has been well written. It is because we have had such great writers in the past that a writer is driven far out past where he can go, out to where no one can help him.
    Ernest Hemingway (1899–1961)