Subject: Re: Minor performance tweak to bcopy_page.S
To: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm32
Date: 03/08/2001 16:03:29
On Thu, 8 Mar 2001, Ignatios Souvatzis wrote:
> > >This patch is a minor tweak to arm/arm32/bcopy_page.S.
> >
> > Out of curiosity (I've not looked at the code) is there a good reason
> > for not using memcpy() here?
>
> Uhm, fixed, known, and especially known to be aligned size (and aligned
> addresses)?
Hmm. At the moment, our memcpy() has an overhead of two instructions per
loop in the aligned case, the same as bcopy_page (though memcpy()
currently uses smaller blocks). There is, admittedly, a startup overhead
of about fifteen instructions, and about the same at the end, though I'm
not sure that's worth worrying about on a 4-KB copy.
It just seems odd to me to have two functions to do essentially the same
job. If memcpy() isn't as fast as bcopy_page when copying whole pages,
memcpy() really should be fixed so that it is.
On the other hand, I don't want to touch memcpy() either...
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>