Boost logo

Boost :

Subject: Re: [boost] [gsoc] boost.simd news from the front.
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-06-10 22:03:25


On 11/06/2011 02:27, Simonson, Lucanus J wrote:

> No, the compiler will substitute a couple moves and a long jump to __memcpy assembly code. Memcpy is vectorized by hand. The compiler does not need help of any kind to vectorize this loop, but this is a special case. Also, memcpy is clearly EP. All simple filters that are embarasingly EP are some operation done in the middle of what is effectively a memcpy, sometimes the source and destination are the same. You have the same vector loads and stores and the only difference is you actually do something with the data while it is register. The compiler should never vectorize memcpy when it has the better option of substituting the hand coded assembly for memcpy. If you somehow tricked it into generating vector code instead of __memcpy you would get worse performance.

With GCC you certainly don't get the same results at all with an
element-per-element copy and and with memcpy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk