Drawing Blanks

Premature Optimization is a Prerequisite for Success

Some clarification

leave a comment »

My previous posts might have given the reader the wrong impression regarding some of my opinions. Here are some clarifications.

1. I do not think that iterative algorithms perform better than recursive.  I do not think that imperative algorithms are faster than declarative. I do not think that procedural programs are faster than functional.
In fact, I love the new functional features of C# and I’ve been using them to gain performance benefits too.

2. I do not think that algorithms that are used in Xworder are state of the art in terms of performance. Thanks to C# and the .Net framework  (and in particular to generic collections and IEnumerable), I managed (in about 10 nights) to write the app that exhibits decent performance (under moderate load). While I’m going to continue (or to begin) to describe the insides of Xworder, please don’t rely on this blog as a source of high performance algorithms. There are better sources. E.g. for combinatorial algorithms in C# check out http://www.codeproject.com/KB/recipes/Combinatorics.aspx

3. Fixation on Premature Optimization? Yes. I do think that the premature optimization quote has done much more harm than good to software development. I do think that performance (capacity, scalability, response time, throughput etc.) must be considered at the earliest stages of software design and development. Usually, when the need to optimize matures – it’s already too late.

Of course, I’m not suggesting that we must optimize everything. There is no reason to optimize something that’s never going to become a bottleneck. But unfortunately, many developers (and [micro]managers) misguided by the premature optimization quote, consciously neglect to consider performance at all, until it becomes a problem.

Advertisements

Written by bbzippo

11/12/2009 at 8:01 am

Posted in programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: