问题描述
我有一个MFC应用程序,我希望在其中集成一些.Net功能;它是一个服务器应用程序,必须具有尽可能高的性能,我希望能够使用一些用C#编写的自定义控件和其他实用程序库。
问题是:启用/ clr编译器选项是否暗示了预先存在的原生特征的性能?
I have an MFC application on which I would like to integrate some .Net features; it is a server application that has to be as much performant as possibile, and I would like to be able to use some custom controls and other utility libraries written in C#.
The question is: enabling the /clr compiler option implies anything on the performance of the preexisting native features?
推荐答案
它是一个服务器应用程序必须具有尽可能高的性能
It is a server application that has to be as much performant as possibile
这一切都取决于这样一个句子的确切含义。
如果你真的需要'最高性能'然后每个花哨的库都会产生影响。
另一方面,在大多数情况下,托管代码足够有效(并且通常重要的是算法,而不是语言。
最终答案来自测试:添加一些 .NET
组件到您的应用程序并比较' CLR 启用'软件对抗'完全原生'的软件。
It all depends on the exact meaning of such a sentence.
If you really need 'maximum performance' then every fancy library would have an impact.
On the other hand, managed code is, in most cases, 'efficient enough' (and usually what matters is the algorithm, not the language).
The final answer comes testing: add some .NET
components to your application and compare the performance of the 'CLR
enabled' software against the 'fully native' one.
这篇关于MFC应用程序中的启用/ clr功能意味着性能降低?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!