3 ms·
> SIMD and prefetch instructions that can make things like a memcpy more efficient. Or just use REP MOVS. Modern CPUs recognize it and do optimal memory copy i
by vardump 7y ago
> SIMD and prefetch instructions that can make things like a memcpy more efficient.
Or just use REP MOVS. Modern CPUs recognize it and do optimal memory copy internally. Prefetch instructions are rarely beneficial, and often cause worse performance.
Edit: Apparently AMD Ryzen lacks REP MOVS optimization. SIMD based memcpy performs the best on it. (Intel supports REP MOVS optimization since Ivy Bridge.)