2 ms·
> They were the fastest way to do string operations on those early CPUs, but I don't think this the case on modern CPUs. Modern CPUs still have a fast path for
by exDM69 10y ago
> They were the fastest way to do string operations on those early CPUs, but I don't think this the case on modern CPUs.
Modern CPUs still have a fast path for string operations, and I recall hearing that they even had some improvements not too long ago (in Sandy Bridge or other recent arch).
CPUs may be smart enough to detect a memcpy done with a loop, but REPxx is the preferred way - even on modern CPUs.