[PD] array copy speed test

chris clepper cgclepper at gmail.com
Tue Aug 1 15:01:54 CEST 2006


On 8/1/06, Tim Blechmann <TimBlechmann at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060801/b83827ff/attachment.htm>


More information about the Pd-list mailing list