3 ms·
> At a bare minimum, AVX grossly accelerates memcpy and memset operations. Not necessarily, for large operations and depending on processor generation a simple
by the8472 8y ago
> At a bare minimum, AVX grossly accelerates memcpy and memset operations.
Not necessarily, for large operations and depending on processor generation a simple rep stos/movsb will be simpler (no alignment requirements) and saturate your memory bandwidth just as well as any AVX sequence will with less icache pressure.
- dragontamer 8y agoI wasn't aware of ERMSB "Enhanced Rep MOVSB". Thanks for the tip. Seems to be a feature in Ivy Bridge and later, which happens to be around the time AVX2 started.
- eloff 8y agoTo be fair, it's issuing a long sequence of microcode ops under the hood using 256bit ops.