By Peter Bell

Definition: Premature Optimization

An embarrassing condition that afflicts programmers who are so concerned about performance that they can't wait to build an application before they shoot off to improve the performance of parts of the application that probably would never become performance bottlenecks anyway.

Written by an occasional sufferer.

Comments
"Premature optimization is the root of all evil".

http://en.wikipedia.org/ wiki/Donald_Knuth

Are you actually trying to say something or are just just filling up blog entries?
# Posted By pan69 | 7/3/06 4:06 AM
I wanted to provide a page I could link to, so when I used the phrase "premature optimization" in the next blog posting (on Duck Typing for Performance), I would have a definition. (Many thanks for adding the link!). While the post was only two sentances long, I'd argue it is still one of the most important to date.

I have wasted so much time in the past worrying about performance in areas of systems that turned out to be irrelevant to the overall performance that I wanted to remind myself and others that in the vast majority of cases it makes much more sense to build - then refactor.

I'll give you a perfect example. I am considering using Reactor. I know that in the past it has had some performance issues so I was worried about whether it would make sense to use it or not. I then thought about the work it would be to write the relationships stuff myself (even with an application generator) and while I have not yet decided to use Reactor (there is something to writing the ORM as an exercise and Reactor doesn't work exactly as I'd like it to), I have decided that I will not worry about performance. If I build a system, if performance is a problem and if I identify Reactor as being the problem, I can then start by replacing one query at a time until the performance issue is fixed.

It is usually the most obvious posts that have the most value!

Also, I've written over 30 posts in one week and I feel most of them had some useful substance. I have hundreds more in my head. Last thing I need to do is "fill up blog entries"!

Best Wishes,
Peter
# Posted By Peter Bell | 7/3/06 9:17 AM
Hi Peter,

You've been making quite a few excellent posts. Keep it up!
# Posted By Rob Brooks-Bilson | 7/3/06 11:02 AM
Hi Rob,

Thanks for the comment - and the cheerleading - both much appreciated!!!

But please keep me honest. If you see anything you think it wrong, arguable or facile, please post a comment. If I really knew what I was talking about I probably wouldn't be talking about it so much!

Best Wishes,
Peter
# Posted By Peter Bell | 7/3/06 11:13 AM
You see. When you put it in context it actually also makes sense to someone else.
# Posted By pan69 | 7/3/06 9:47 PM
Just wait until Peter starts a framework or OSS project. I gaurentee your blogs go to nil ;-)

P.s. Nice to see my Captcha everywhere now...
# Posted By Peter J. Farrell | 8/3/06 2:21 AM
Hi Pete,

Gone to nil just with project work over last couple of weeks :-<

But I'm more interested in releasing the thinking and snippets than end projects. I do have a few pieces I'll be open sourcing, but the focus will be on the thinking that created them and on small snippets that people can use without having to make any big committments (i.e. more like your great captcha than a MG or mach-ii).

Best Wishes,
Peter
# Posted By Peter Bell | 8/3/06 6:34 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.