Hacker News new | ask | show | jobs
by 1_player 4079 days 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

1 comments

Conditional moves have data dependencies on their input arguments, but so do the "branchless" versions presented in the article.