---
title: Premature optimization is the root of all evil
abstract: The history of a popular quote seems to lead from Knuth to Hoare to Dijkstra.
categories:
- culture
- work
content-tags:
- history
- programming
- popular
---

"Premature optimization is the root of all evil." is a popular quote with mysterious origins.  It is widely attributed to Donald Knuth, who [apparently][1] [used it][2] in _[Structured Program with goto Statements][3]_ but later [credits][4] Tony Hoare.

   [1]: http://mail.python.org/pipermail/python-list/2003-April/158618.html
   [2]: http://groups.google.com/groups?selm=tl2n195b1io.fsf%40space.at
   [3]: http://portal.acm.org/citation.cfm?id=356635.356640&idx=356635&part=periodical&WantType=periodical&title=ACM%20Computing%20Surveys%20%28CSUR%29
   [4]: http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&safe=off&threadm=CMtF68.GKB%40metronet.com&rnum=1&prev=/groups%3Fselm%3DCMtF68.GKB%2540metronet.com

Hoare, however, did not claim it when I queried him in January of 2004:

> Dear Hans,
>
> I'm sorry I have no recollection how this quotation came about.? I might have attributed it to Edsger Dijkstra.
>
> I think it would be fair for you assume it is common culture or folklore.
>
> Tony.

[Bruce Eckel][5] also [credits Dijkstra][6].  Now **that** would be ironic, since the widely-attributed first use by Knuth was written as a rebuttal to Dijkstra's _[Go To Statement Considered Harmful][7]_.

   [5]: http://www.mindview.net/
   [6]: http://jamesthornton.com/eckel/TIPatterns/html/Introduction.html
   [7]: http://dl.acm.org/citation.cfm?id=1241518
