A new review of an old book. Published in 1994 (When I was starting college with a shiny new pentium-90 or thereabouts) I got turned on to the book through a comment by the author on StackOverflow.com. It’s an interesting mix of things seem strangely prescient in retrospect, and those that would elicit cries of “coding horror” from many circles.
The book is broken down into five chapters, with a big chunk taken up by source code appendices (also on a floppy disk)
“Chapter 1: Speed” includes a discussion of information theory, and how asking the right kinds of questions can get the answer faster. It then describes a method of manual call-stack sampling (pause the debugger) to identify problem areas. The chapter wraps up with an extended example of optimizing a manufacturing job scheduling system from 48 seconds to 1.1 seconds. The complete code for several points along this process is included in the appendices.
“Chapter 2: Redundancy” describes the gains to be had from ignoring duplicated information. The author describes his own independent implementation of a diff program. Next, he presents an implementation of a differential execution engine – a technique which was more recently applied to Windows dialogs.
“Chapter 3: Language” talks about domain specific languages (thought the book doesn’t use that term) which are quite in vogue nowadays. In previous chapters, little languages are presented using C macros, some of which involve goto – an aspect for which I suspect it would be decried today. This chapter focuses more on topics that would be more acceptable – a simple parser for a trivial language, and more generic lexer engine.
“Chapter 4: Data” builds on the language topic by defining four levels of languages and describing which situations each is best suited for. I then goes on to describe a lightweight tasking, implemented with C macros, to handle problems at the highest language level, and using program generation for a database synchronization task.
“Chapter 5: Method” attempts to distill the overall message of the book into a handful of questions and answers, and a few illustrative examples.