Re: [OT] Premature optimizations
Re: [OT] Premature optimizations
- Subject: Re: [OT] Premature optimizations
- From: Darrin Cardani <email@hidden>
- Date: Thu, 29 Jul 2004 22:44:28 -0500
At 2:55 PM -0700 7/29/04, Allan Odgaard <email@hidden> wrote:
I doubt many
experienced programmers would waste their time optimizing in the wrong
place, so perhaps I can agree to: "some unexperienced programmers w/o
mathematical intuition do on occasion waste their time making improper
optimizations" ;)
Not only that, but I have read nearly identical assertions
in nearly every single textbook I have that deals with programming
I am aware of the popularity of this claim, but based on my experience
it holds little merit.
In Steve McConnell's "Code Complete", he sites Wayne Steven's book
"Using Structured Design" as having hard data which supports the
claim. I've not read Steven's book, so I can't comment on his
methodology, however, according to McConnell, tests showed that:
"If the development time saved by implementing the simplest program
is devoted to optimizing the running program, the result will
*always* be a faster running program than the one in which
optimization efforts have been exerted indiscriminantly as the
program was developed."
(Emphasis added)
(And since it came up, the exact quote was from Donald Knuth who said
"We should forget about small efficiencies, say about 97% of the
time: premature optimization is the root of all evil.")
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<
http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.