On Sun, 03 Aug 2003 12:12:05 GMT, "John Edwards" <sa***@caselearning.com>
wrote:
I'm trying to come up with a more cache efficient memcpy loop
to reduce the number of cache misses I'm experiencing.
My current solution:
for (i = 1; i < numlines; i++)
{
foo(Offset >= 0);
RMemCopy(CurrentPos, Line, (unsigned)Abs(Offset));
CurrentPos += Offset;
}
I'm even open to inline ASM.
Any ideas?
This is not a C++-related question, but a microprocessor-specific one.
Having said that, I have written memcpy and memset routines that are
specifically targeted to take advantage of a particular microprocessor's
instruction and data cache architecture.
How I did it is beyond the scope of this newsgroup.