3 ms·
It depends on the CPU. There is no good reason for "rep movsb" to be slower at any big enough data size. On a Zen 3 CPU, "rep movsb" becomes faster than or the
by adrian_b 2y ago
It depends on the CPU. There is no good reason for "rep movsb" to be slower at any big enough data size.
On a Zen 3 CPU, "rep movsb" becomes faster than or the same as anything else above a length slightly greater than 2 kB.
However there is a range of multi-megabyte lengths, which correspond roughly with sizes below the L3 cache but exceeding the L2 cache, where for some weird reason "rep movsb" becomes slower than SIMD non-temporal stores.
At lengths exceeding the L3 size, "rep movsb" becomes again the fastest copy method.
The Intel CPUs have different behaviors.
- deleted 2y ago[deleted]