The "rules" of optimising are a rhetorical device intended to dissuade novice programmers from cluttering up their programs with vain attempts at writing optimal code. They are:
- FirstRuleOfOptimization - Don't.
- SecondRuleOfOptimization - Don't... yet.
It is uncertain at present, whether cute devices such as this have, or ever will, change any attitudes.
It changed mine.
used to say (when asked about optimization):
- Don't Yet (for experts only).
This is republished in JonBentley
And lets not forget these famous quotes:
- "The best is the enemy of the good."
- -- MrVoltaire
- "More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity."
- -- W.A. Wulf
- "We should forget about small efficiencies, say about 97% of the time: PrematureOptimization is the root of all evil."
- -- DonKnuth (who attributed the observation to CarHoare)
EditText of this page
(last edited May 6, 2009)
or FindPage with title or text search