[Haskell-cafe] Re: A suggestion for the next high profile Haskell project

ajb at spamcop.net ajb at spamcop.net
Sat Dec 23 07:05:08 EST 2006

G'day all.

Quoting Tomasz Zielonka <tomasz.zielonka at gmail.com>:

> I think it's high time to remind the very true Hoare's words:
>     "Premature optimization is the root of all evil in programming"
> It's strange nobody mentioned it earlier.

You have yeard it said in the past that the three rules of optimisation

Rule 1. Don't do it.

Rule 2. (For experts only) Don't do it yet.

Rule 3. (For real experts only) When you've found a performance issue,
profile first, find where the bottlenecks are, and then optimise.  For
if you guess, you'll guess wrong.

Truly I say unto you that there is a fourth rule:

Rule 4. (For serious guru experts only)  Sometimes, performance matters.
When it matters, it REALLY matters.  If you find yourself in this
situation, then the performance that you need must be designed in; it
can't be added later.  So go ahead and spend ten minutes optimising your
code on the back of an envelope before writing anything.

It's fair to say that this conversation is mostly being conducted by
experts, so we're way past rule 1.  Which of rules 2, 3 or 4 apply to
the hypothetical OpenPGP project can only be determined by someone
trying it.

Andrew Bromage

More information about the Haskell-Cafe mailing list