Re: What is Premature Optimization?
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 21:01:34 GMT
tenxian wrote:
Is it good or bad?
(Typically it's considered bad form to put the main question as the subject.)
Anyways, "premature optimization" (most likely deriving from the old quote, "Premature optimization is the root of all evil," attributed to Donald Knuth, author of TAOCP) is a simple phrase that is not idiomatic, and thus can be parsed directly.
Premature - something happening before it should
Optimization - the process (or at least an attempt) of increasing efficiency (with general connotation to time and somewhat so less so to space)
Therefore, "premature optimization" is the process whereby the efficiency is increased before it should be, or, cleaning up a bit, "optimizing" code before one can say whether or not it should be. It generally refers to people optimizing code based on where he or she believes the code to be underperforming, instead of based on rigorous tests which pinpoint the exact blocks which are consuming the most time.
As to your latter question, it is generally considered poor form. Knuth's quote I've cited above, but another programmer (his name escapes me at the moment) said something to the effect that "more sins are committed in the name of optimization than any other cause--including stupidity." I suspect it is up to decide to yourself, though...
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.
- References:
- What is Premature Optimization?
- From: tenxian
- What is Premature Optimization?
- Prev by Date: Re: Inconsistent CPU usage
- Next by Date: urgent opening for PHP,Mysql developer -6months-Encino,CA
- Previous by thread: Re: What is Premature Optimization?
- Next by thread: Free YouTube Video Downloader Software
- Index(es):
Relevant Pages
|