Next Making Programs Faster 165

Good Advice

Premature optimization is the root of all evil.

There is no doubt that the "grail" of efficiency leads to abuse. Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and such attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, about 97% of the time. Premature optimization is the root of all evil.

Yet we should not pass up out opportunities in that critical 3%. Good programmers will not be lulled into complacency by such reasoning, they will be wise to look carefully at the critical code; but only after the critical code has been identified.


Next Copyright © 2003 M. J. Dominus