4 ms·
Reasonably modern versions of GCC will emit various rep instructions in some cases. Some code I just compiled with GCC 6.1.1 had several snippets like this emi
by veddan 10y ago
Reasonably modern versions of GCC will emit various rep instructions in some cases.
Some code I just compiled with GCC 6.1.1 had several snippets like this emitted for zeroing with memset:
xor eax,eax
...
rep stos QWORD PTR es:[rdi],rax
and some rep movs for memcpy/memmove.
- chkras 10y agoreally? I wonder if the timing of rep and string instructions have improved at all?
- userbinator 10y agoThey operate on cacheline-sized pieces ever since the P6.