Subject: Re: linux audio code
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 03/12/1996 13:54:00
> Note that on most processorrs, bzero() is going to be slightly faster
> than memset() if implemented correctly (and the i386 version is at
> least).

I think that at least on the SPARC, the difference is (a) small enough
to ignore and (b) purely overhead, no factor depending on the size of
the block being filled.

> I'm not sure whether it is enough of a difference to care about
> though...

On no processor is there any excuse for memset (with a 0 fill byte) to
be more than a test and a conditional branch slower than bzero (plus
calling mechanism differences - three args may be slower than two),
unless memory is _so_ tight that having special-case zero-fill code is
impractical.  (Or unless the difference is so small as to be not worth
bothering with, as I suspect would be the case on the SPARC.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu