C / C ++编译器优化的反馈 [英] C/C++ compiler feedback optimization

查看:125
本文介绍了C / C ++编译器优化的反馈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人看到了其中所使用的反馈最优化的C / C ++编译器提供支持分支prediction不同的程序,缓存preloading功能等任何真实世界的数字

Has anyone seen any real world numbers for different programs which are using the feedback optimization that C/C++ compilers offer to support the branch prediction, cache preloading functions etc.

我搜索了它,令人惊讶甚至没有流行间preTER开发组似乎已经检查的效果。并增加10%的红宝石,Python和PHP等性能左右应该算是有用的。

I searched for it and amazingly not even the popular interpreter development groups seem to have checked the effect. And increasing ruby,python,php etc. performance by 10% or so should be considered usefull.

难道真的没有好处或者是整个开发者社区只是懒得用呢?

Is there really no benefit or is the whole developer community just to lazy to use it?

推荐答案

10%,是一个很好的大概数字。这就是说,...

10% is a good ballpark figure. That said, ...

您必须真正关心的性能走这条路线。我对(DB2)的工作该产品采用PGO和其他侵入性和侵略性的优化。其中成本是显著构建时间(在某些平台上三倍),并开发和支持的噩梦。

You have to REALLY care about the performance to go this route. The product I work on (DB2) uses PGO and other invasive and agressive optimizations. Among the costs are significant build time (triple on some platforms) and development and support nightmares.

当不顺心的事也可以是不平凡在优化code映射故障位置回源。开发商通常不期望在不同的模块功能可以结束合并,内联,这可以有有趣的效果。

When something goes wrong it can be non-trivial to map the fault location in the optimized code back to the source. Developers don't usually expect that functions in different modules can end up merged and inlined and this can have "interesting" effects.

与指针别名问题,这是讨厌也追查通常与这类优化显示。你必须有非确定性的生成的额外的乐趣(走样问题可以在周一的建设展现出来,再消失,直到周四,...)。

Problems with pointer aliasing, which are nasty to track down also usually show up with these sorts of optimizations. You have the additional fun of having non-deterministic builds (an aliasing problem can show up in monday's build, vanish again till thursday's, ...).

之间是什么在这类激进的优化的正确或不正确的编译器行为的线路也变得相当模糊。即使有我们的房子(字面)优化问题(无论是在我们的源代码或者编译器)编译器的家伙奢侈品仍然不容易理解和解决。

The line between what is correct or incorrect compiler behaviour under these sorts of aggressive optimizations also becomes fairly blurred. Even with the luxury of having our compiler guys in house (literally) the optimization issues (either in our source or the compiler) are still not easy to understand and resolve.

这篇关于C / C ++编译器优化的反馈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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