l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 15: Scratch: programming for children and other not-yet-programmers
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2006 Jun 16 15:04

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] loop efficiency and testing against zero.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] loop efficiency and testing against zero.



On Fri, Jun 16, 2006 at 02:31:10PM -0700, Rod Roark wrote:
> On Friday 16 June 2006 14:21, Micah J. Cowan wrote:
> ...
> > Optimization should always happen after implementation.
> 
> No generalization is worth a damn, including this one.

Absolutely.

And, in fact, I think that phrase (the one I just wrote a moment ago...)
is a bit simplistic and overused without qualification.

The truth is, if you know two ways to do something: an easy one that's
exponential-time, and a /slightly/ harder one that's linearythmic, by
golla, you'll do the linearythmic one... especially if you can pretty
much count on it being used frequently.

I think the thing you really want to warn against is nit-picky
optimizations that have exactly the same complexity (as denoted by the
Big Theta notation), but that just tweak the constant term, or the
constant multiplier by a negligible amount.

But "Optimization should happen after implementation" is quicker to say,
and is a good rule-of-thumb at any rate...

:-)

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.