[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using memcpy or memmove instead of for loop in liboctave/array/dim-v

From: PrasannaKumar Muralidharan
Subject: Re: Using memcpy or memmove instead of for loop in liboctave/array/dim-vector.h
Date: Sun, 10 Nov 2013 09:52:34 +0530

On 9 November 2013 22:30, John W. Eaton <address@hidden> wrote:
> Yes, nearly always just 2 or 3 dimensions plus the reference count and
> number of dimensions (they are all stored together in the same array). So I
> doubt that changing the way this copy is done will make much difference.

If the size is going to be small std::copy or memcpy will not improve
the performance. SIMD instruction may have alignment requirements, so
memcpy may check for those. If the size is small memcpy internally can
use for loop after doing some checking. These checking can hamper the
performance. Feels like the current implementation is better.

I thank everyone for taking their time for this.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]