2 ms·
CMP + JMP have a branch, which can be mispredicted and then you may pay 5-10x more than for cmp + cmov.
by lossolo 2y ago
CMP + JMP have a branch, which can be mispredicted and then you may pay 5-10x more than for cmp + cmov.
- BeeOnRope 2y agoThey won't be mispredicted nor take predictor resources since the default prediction is "not taken" and these branches are never taken (except perhaps once immediately before an OOB crash if that occurs). So they are free in that sense.