Subject: Re: Memory copy performance
To: None <paalh@unik.no, tech-kern@netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: tech-kern
Date: 01/30/2001 11:55:07
> From: =?iso-8859-1?Q?P=E5l_Halvorsen?= <paalh@unik.no>
>
> Hi!
>
> I have performed an experiment looking at memory copy performance using
> copyin, copyout and memcpy on an i386 machine.
>
> My tests indicate that it is faster to copy data if the size is between
> 1kb and 8 kb. The performance drops dramatically at sizes >=16kb and =<0.5kb.
>
> Why is this so? Is there some optimalization for these sizes?
You now have experimental evidence that...
1. Damn, Intel really DID put a cache level or two in that chip
2. There is startup overhead associated with protection checks
and setting up the transfer instructions.
:-)
--Ross