Re: What's more important optimisations or debugging?
- From: Paul Taylor <paul_ng_pls_rem@xxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 17:35:42 +0100
On Thu, 31 May 2007 12:00:56 +0000, Wilco Dijkstra wrote:
Remember Knuth's golden rules about optimisation:
1. Don't do it.
2. (For experts only) Don't do it yet.
I don't agree with this. For small programs it is easy to implement an
efficient algorithm immediately rather than start with an inefficient one.
It's hard to improve badly written code, so rewriting it from scratch
would be better than trying to fix it.
For large programs it is essential that you select the most optimal
architecture and algorithms beforehand, as it is usually impossible to
change them later. The bottlenecks are typically caused by badly
designed interfaces adding too much overhead.
In my experience well designed code is both efficient and easy to
understand, so it wouldn't need optimization (apart from fine tuning).
In other words, if you *need* to optimise an application, you got it wrong.
What you are describing is what I would image all experienced software
engineers do. But then what do you do if performance isn't good enough?
i.e. wrt the design - you got it wrong. I suspect that's when Knuth's
golden rules kick in. I could of course be barking up the wrong tree -
I haven't read Knuth.
Regards,
Paul.
.
- Follow-Ups:
- Re: What's more important optimisations or debugging?
- From: Wilco Dijkstra
- Re: What's more important optimisations or debugging?
- References:
- What's more important optimisations or debugging?
- From: rhapgood
- Re: What's more important optimisations or debugging?
- From: Dave Hansen
- Re: What's more important optimisations or debugging?
- From: David Brown
- Re: What's more important optimisations or debugging?
- From: Wilco Dijkstra
- What's more important optimisations or debugging?
- Prev by Date: Re: any embedded x86 board less than $200 USD?
- Next by Date: Re: any embedded x86 board less than $200 USD?
- Previous by thread: Re: What's more important optimisations or debugging?
- Next by thread: Re: What's more important optimisations or debugging?
- Index(es):
Relevant Pages
|