But pro- grams are often complicated at the microscopic level, and that is something I can address here. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is. Fancy algorithms have big constants. For example, binary trees are always faster than splay trees for workaday problems.
Fancy algorithms are buggier than simple ones, and they're much harder to implement.
Use simple algorithms as well as simple data structures. For instance, a symbol table might be implemented as a hash table containing linked lists of arrays of characters. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. There is no Rule 6.