![]() |
recommend book⇒The Art Of Computer Programming | |
| hardcover | ||
|---|---|---|
| ISBN13: | 978-0-201-48541-7 | |
| ISBN10: | 0-201-48541-9 | |
| publisher: | Addison-Wesley | |
| published: | 1998-10-15 | |
| by: | Donald Knuth | |
| Knuth’s volumes 1, 2 and 3 are the reference works for standard algorithms. At his website he describes plans for volumes 4 and 5. | ||
“Premature optimisation is the root of all evil.”
~ Donald Ervin Knuth (born: 1938-01-10 age: 70)
The problem is fussing over fine detail to optimise wastes time and obscures the algorithm. Optimisation should be confined to choosing a good algorithm on the first pass. Only after the code is working should you fret over optimisation. Then, only if it needs it, determine the bottlenecks by measurement and fix only those.
Don’t do optimisations the compiler will do for you. That just clutters your code.
People often misapply the nostrum to imply that optimisation itself is evil. Only premature optimisation is.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.62] | The information on this page is for non-military use only. | ||
| You are visitor number 8,522. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/knuth.html | J:\mindprod\jgloss\knuth.html | ||