在阅读了这篇文章后(在StackOverflow上回答)(在优化部分),我想知道为什么条件移动不容易受到分支预测失败的影响.我在一篇关于cond移动的文章中找到了(PDF由AMD提供).在那里,他们声称cond的性能优势.移动.但为什么会这样呢?我没有看到它.在评估ASM指令的时刻,前面的CMP指令的结果尚未知晓.
谢谢.
optimization performance assembly cpu-architecture branch-prediction
assembly ×1
branch-prediction ×1
cpu-architecture ×1
optimization ×1
performance ×1