19 ms·
Aren't setcc/cmov* instructions effectively similar to a branch? To compute the result you need to execute the previous instruction. I suppose that these instr
by 1_player 12y ago
Aren't setcc/cmov* instructions effectively similar to a branch? To compute the result you need to execute the previous instruction.
I suppose that these instructions do not cause the instruction pipeline to be flushed, compared to an incorrectly predicted jump, but they still stall until the previous instruction has been executed.
jmp < setcc/cmov* < branchless conditionals
- Scaevolus 12y agoConditional moves have data dependencies on their input arguments, but so do the "branchless" versions presented in the article.