C ++托管代码编译器比C#更快吗? [英] Is C++ managed code compiler faster than C#?
问题描述
嗨新闻组
c ++编译器在执行时生成的代码比C#
编译器更快吗?
c ++编译器比C#编译器有更多的优化吗?
提前谢谢!
Hi newsgroup
Does the c++ compiler generate faster code at execution time than the C#
compiler?
Does the c++ compiler have more optimisations than the C# compiler?
Thanks in advance!
推荐答案
Henrik,
我不知道你会在C ++与C#或VB中使用Managed
Extensions进行更好的代码优化。虽然每个编译器都会产生不同的IL,但是我不相信任何一个编译器会产生一些不同的东西,因为它会影响性能(然后,所有那些nop
VB编译器吐出的指令可能有问题。
希望这会有所帮助。
-
- Nicholas Paldino [.NET / C#MVP]
- ni ************** @ exisconsulting.com
" Henrik Andersen" < PE ********* @ hotmail.com>在消息中写道
新闻:大江************* @tk2msftngp13.phx.gbl ...
Henrik,
I don''t know that you will get better code optimization using Managed
Extensions in C++ versus C# or VB. While each compiler will produce
different IL, I don''t believe that any one compiler will produce something
so different as to affect performance (then again, all those nop
instructions that the VB compiler spits out can be a problem).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com
"Henrik Andersen" <pe*********@hotmail.com> wrote in message
news:Oe*************@tk2msftngp13.phx.gbl...
嗨新闻组
c ++编译器在执行时是否比C#
编译器生成更快的代码?
c ++编译器的优化程度是否比C#编译器更多?
>提前致谢!
Hi newsgroup
Does the c++ compiler generate faster code at execution time than the C#
compiler?
Does the c++ compiler have more optimisations than the C# compiler?
Thanks in advance!
2003年9月17日星期三19:12:27 +0200,Henrik Andersen>
< pe ********* @ hotmail.com>写道:
On Wed, 17 Sep 2003 19:12:27 +0200, "Henrik Andersen"
<pe*********@hotmail.com> wrote:
嗨新闻组
c ++编译器在执行时生成的代码比C#
编译器更快吗?
> c ++编译器是否比C#编译器具有更多优化?
Hi newsgroup
Does the c++ compiler generate faster code at execution time than the C#
compiler?
Does the c++ compiler have more optimisations than the C# compiler?
嗯,你必须考虑C#是专门为
而设计的..net框架,从而允许C#编译器设计为吐出
'更好''(注意'')MSIL。
两个编译器的托管C ++ en VB.net有遗留问题
可能(可能,不会)导致质量较差的MSIL
-
NULL
Well, you have to consider that C# was designed specifically for the
..net framework, thus allowing the C# compiler to be designed to spit
out ''better'' (note the '') MSIL.
Both the compilers for managed C++ en VB.net have legacy issues that
might (might, not will) lead to lesser-quality MSIL
--
NULL
>好吧,你必须考虑C#是专门为
> Well, you have to consider that C# was designed specifically for the
.net框架设计的,因此允许C#编译器设计为吐出更好(注意'' )MSIL。
托管C ++和VB.net的编译器都存在遗留问题,可能(可能,不会)导致质量较差的MSIL
.net framework, thus allowing the C# compiler to be designed to spit
out ''better'' (note the '') MSIL.
Both the compilers for managed C++ en VB.net have legacy issues that
might (might, not will) lead to lesser-quality MSIL
C#专为框架设计的事实意味着什么。
您可以为.NET编写COBOL编译器(使用System.Reflection.Emit
命名空间)它比C#编译器更有效率(从查看由C#编译器生成的优化IL开始,只是
可以是唯一的东西)改进了它的堆栈用法。
The fact that C# was designed specifically for the framework means nothing.
You could write a COBOL compiler for .NET (using the System.Reflection.Emit
namespace) that''s even more efficient than the C# compiler (from looking at
the optimized IL produced by the C# compiler, just about the only thing that
can be improved is it''s usage of the stack).
这篇关于C ++托管代码编译器比C#更快吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!