是否有使用可能/不太可能的提示的性能测试结果? [英] Are there any performance test results for usage of likely/unlikely hints?

查看:76
本文介绍了是否有使用可能/不太可能的提示的性能测试结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gcc功能可能/不太可能的提示,可帮助编译器生成具有更好分支预测的机器代码.

gcc features likely/unlikely hints that help the compiler to generate machine code with better branch prediction.

是否存在有关如何正确使用或无法使用这些提示如何影响某些真实系统上的真实代码性能的数据?

Is there any data on how proper usage or failure to use those hints affects performance of real code on some real systems?

推荐答案

问题不同,但这个问题给出了明确的提示;).现代CPU会忽略静态提示,而使用动态分支预测.

The question differs, but Peter Cordes's answer on this question gives a clear hint ;) . Modern CPU's ignore static hints and use dynamic branch prediction.

这篇关于是否有使用可能/不太可能的提示的性能测试结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆