Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 1995 13:10:37 -0600
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        Terry Lambert <terry@lambert.org>
Cc:        bde@zeta.org.au (Bruce Evans), hackers@FreeBSD.ORG
Subject:   Optimizations matter? ( was Re: netisr code..)
Message-ID:  <199510171910.NAA07670@rocky.sri.MT.net>
In-Reply-To: <199510171837.LAA28008@phaeton.artisoft.com>
References:  <199510170755.RAA00245@godzilla.zeta.org.au> <199510171837.LAA28008@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert writes:
> > That is slower at the end.  However, micro-optimizations here are probably
> > not important.  Everything except the atomic btrl could be written in C
> > and you probably wouldn't notice the difference.
> 
> The attitute that an optimization "doesn't matter" (this one is a bad
> example -- it's not really an optimization) is bad.

In theory I agree with you.  However, in practice I've found that most
micro-optimizations make the code *MUCH* (!!!!!) more un-readable, and
thus the optimization isn't worth the loss of maintainability.  Again,
this is a hard call to make, but needs to be mentioned.

But, given 'optimized' versions and corresponding 'C' versions of the
code is a nice tradeoff.  That way a person can (hopefully) see what the
code is attempting to do in a more readable manner while still having
access to highly optimized implementations as well.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510171910.NAA07670>