[PATCH] more problems with newlib/libc/machine/m68k/memcpy.S
Josef Wolf
jw@raven.inka.de
Wed Feb 10 16:40:00 GMT 2010
On Tue, Feb 09, 2010 at 05:10:38PM -0800, Aaron J. Grier wrote:
> if you're going to optimize for cpu32, see if you can optimize the copy
> loops into a single word instruction followed by a dbxx instruction.
> this avoids instruction fetches during the loop and increases bus
> throughput substantially.
I've done some measurements. Copying 1 meg on a 20MHz 68332 (cpu32) gives
those figures:
196 msecs with the DBxx method you suggested
215 msecs with unrolled loop (the original code)
626 msecs with byte-wise (Lresidue) loop.
So, you're right. the DBxx method gives about 10% improvement.
While measuring this, I noticed one more problem: if the Lresidue path is
taken (because of misaligned access) only (COUNT modulo 0x10000) bytes are
copied.
More information about the Newlib
mailing list