Subject: Re: bcopy, bzero, copypage, and zeropage
To: Guenther Grau <s_grau@ira.uka.de>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 12/14/1996 08:37:28
On Fri, 13 Dec 1996 04:12:02 +0100
Guenther Grau <s_grau@ira.uka.de> wrote:
> Hmm, if you really want to microoptimize, I guess you'll have to write
> a version for each cpu we support and use the usual tricks to test for
> the cpu just once, preferably during boot and after that just use the
> functions without having to test for the cpu over and over again.
A much better approach is to gave a single function that does the
comparisons only if configured for multiple CPU variants. If only
configured for one, the comparisons aren't there (they're #ifdef'd).
This eliminates unnecessary code size and overhead from indirect
function calls in the critical path.
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939