4 ms·
This what was generated with clang / gcc x64 with O2/O3 flag on godbolt.org abs_branchless(int): mov eax, edi neg eax cmovs
by senfiaj 1y ago
This what was generated with clang / gcc x64 with O2/O3 flag on godbolt.org
abs_branchless(int):
mov eax, edi
neg eax
cmovs eax, edi
ret
abs_branch(int):
mov eax, edi
neg eax
cmovs eax, edi
ret