Visual Studio构建中“优化代码”选项的优点 [英] Benefits of 'Optimize code' option in Visual Studio build
问题描述
我们的许多C#版本代码是通过关闭优化代码选项构建的。我相信这是为了允许在发布模式下构建的代码更容易调试。
Much of our C# release code is built with the 'Optimize code' option turned off. I believe this is to allow code built in Release mode to be debugged more easily.
由于我们创建相当简单的桌面软件连接到后端Web服务不是一个特别的处理器密集型应用程序),那么如果可能出现任何类型的性能损失呢?
Given that we are creating fairly simple desktop software which connects to backend Web Services, (ie. not a particularly processor-intensive application) then what if any sort of performance hit might be expected?
任何特定平台可能受到更糟的影响?例如。多处理器/ 64位。
And is any particular platform likely to be worse affected? Eg. multi-processor / 64 bit.
推荐答案
完整详细信息位于 http://blogs.msdn.com/jaybaz_ms/archive/2004/06/28/168314.aspx 。
简介...
在托管代码中,JITter在运行时几乎所有的优化。生成的IL与此标志的差异非常小。
In managed code, the JITter in the runtime does nearly all the optimization. The difference in generated IL from this flag is pretty small.
这篇关于Visual Studio构建中“优化代码”选项的优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!