On 8/1/06, Tim Blechmann <TimBlechmann@gmx.net> wrote:
On Tue, 2006-08-01 at 11:28 +0200, geiger wrote:
> > Anyone feel like SIMDifiying [arraycopy] (hint hint ;).  I suppose
> > vasp is a SIMD version of [arraycopy].
>
> SIMD doesn't help in copying data. And in any case, introducing
> platform dependend code is only advisable in cases where it really
> matters.

are you sure about this? not having benchmarks on this, i'm pretty sure,
that moving 128 chunks of aligned memory is more efficient than moving 4
32 bit chunks of unaligned memory ...

The cachelines and prefetch don't change for SIMD, so that will be the limitation on blocks outside of L1 and L2.  Copying memory is inefficient no matter what the code is since it doesn't really do any work on the data. 

The basic calls like memcpy() should have CPU specific code on every platform (Windows seems a little suspect though).  In some cases where the data is not in a single linear array memcpy() might not be the most efficient way to copy, but in general it is hard to beat.

cgc