6 ms·
I highly doubt it. That’s 1:1 test eax, 1 ; use result
by BearOso 8y ago
I highly doubt it. That’s 1:1
test eax, 1
; use result
- Hello71 8y agogcc -O2, clang, and icc all produce the sequence: is_even(int): mov eax, edi not eax and eax, 1 ret I am far from a x86 expert, but I assume this version avoids contention on the flags registers and increases pipelining. edit: my mistake, icc and clang produce the equivalent sequence "not edi; and edi, 1; mov eax, edi; ret".