C#性能 [英] C# Performance

查看:55
本文介绍了C#性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1。正在进行哪些工作以使C#性能更接近C ++ / CLI?我们能否期望C#等于C ++ / CLI性能?如果是这样的话?


2.还有哪些工作正在改善

一般的MSIL / CLR / JIT性能?作为与框架的关系,例如2.1,2.2,..是做这些吗

包括性能改造?


-

Greg McPherran
www.McPherran.com

1. What work is in progress to bring C# performance closer to C++/CLI? Can we
expect C# to equal C++/CLI performance? If so when?

2. Also what work is in progress to improve MSIL/CLR/JIT performance in
general? As relases to the Framework e.g. 2.1, 2.2,.. are made do these
include performance imporovements?

--
Greg McPherran
www.McPherran.com

推荐答案

Greg,


这是一个非常广泛的问题。没有一个答案可以涵盖

整个事情。我不认为有一个特定的目标是将

的性能提升到与非托管C ++相同的水平(我认为它实际上非常接近很多)情景已经)。我确信有一般性的增强功能,但我没有遇到任何

文档,说明目前正在查看的具体区域。


如果您在特定情况下寻找性能数字,那么您应该连接一些执行相同工作的测试,然后查看是否<这些数字符合您的需求。


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Greg" < gm@mcpherran.com>在消息中写道

新闻:0B ********************************** @ microsof t.com ...
Greg,

That''s a pretty broad question. There is no one answer which will cover
the whole thing. I don''t think that there is a specific goal to bring
performance to the same level as unmanaged C++ (I think it''s actually VERY
close in many scenarios already). I am sure there are performance
enhancements that are being done in general, but I haven''t come across any
documentation stating specific areas that are currently being looked at.

If you are looking for performance numbers in a specific situation, then
you should wire up some tests which perform the same work, and then see if
the numbers suit your needs.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Greg" <gm@mcpherran.com> wrote in message
news:0B**********************************@microsof t.com...
1.正在进行哪些工作使C#性能更接近C ++ / CLI?可以说我们希望C#与C ++ / CLI性能相等吗?如果是这样的话?

2.还有哪些工作正在进行以改善一般的MSIL / CLR / JIT性能?作为与框架的关系,例如2.1,2.2,..是否做了这些包括性能改进?

- Greg McPherran
www.McPherran.com
1. What work is in progress to bring C# performance closer to C++/CLI? Can
we
expect C# to equal C++/CLI performance? If so when?

2. Also what work is in progress to improve MSIL/CLR/JIT performance in
general? As relases to the Framework e.g. 2.1, 2.2,.. are made do these
include performance imporovements?

--
Greg McPherran
www.McPherran.com



Greg,

我发现这件作品受到了Grimes的启发。

http://www.grimes.demon.co.uk/dotnet/man_unman.htm


彼得


-

联合创始人,Eggheadcafe.com开发者门户网站:
http://www.eggheadcafe.com

UnBlog:
http://petesbloggerama.blogspot.com


" Greg"写道:
Greg,
I found this piece by Grimes enlightening.

http://www.grimes.demon.co.uk/dotnet/man_unman.htm

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Greg" wrote:
1.正在进行哪些工作使C#性能更接近C ++ / CLI?我们能否期望C#等于C ++ / CLI性能?如果是这样的话?

2.还有哪些工作正在进行以改善一般的MSIL / CLR / JIT性能?作为与框架的关系,例如2.1,2.2,..是否做了这些包括性能改进?

- Greg McPherran
www.McPherran.com
1. What work is in progress to bring C# performance closer to C++/CLI? Can we
expect C# to equal C++/CLI performance? If so when?

2. Also what work is in progress to improve MSIL/CLR/JIT performance in
general? As relases to the Framework e.g. 2.1, 2.2,.. are made do these
include performance imporovements?

--
Greg McPherran
www.McPherran.com





Peter Bromberg [C#MVP]" < PB ******* @ yahoo.nospammin.com>在消息中写道

新闻:DA ********************************** @ microsof t.com ...

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:DA**********************************@microsof t.com...
Greg,
我发现这件作品受到了Grimes的启发。

http://www.grimes.demon.co.uk/dotnet/man_unman.htm

相当令人印象深刻。我前一段时间做过的家庭式基准测试表明,对于类似的

密集型任务,C#(1.0版预发布版本为1.0)比C代码慢约300% 。 (对于我来说,这仍然足够高性能 - 我的预期要差得多。)FFT可能会受到FPU管道的限制,

最大限度地减少语言之间的差异。此外,没有内存分配或向托管和非托管API传递数据。任务

这样的确可能通过JITed来实现高效的代码,并且大多数其他程序在b / b $ b的另一端将花费时间等待磁盘,网络,
用户等等 - 所以他们的运行速度一样快。要测试的有趣的

程序类是计算和内存密集的程序,而不是I / O限制,例如状态空间搜索等。


m

Peter

-
联合创始人,Eggheadcafe.com开发者门户网站:
< a rel =nofollowhref =http://www.eggheadcafe.comtarget =_ blank> http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


;格雷格"写道:
Greg,
I found this piece by Grimes enlightening.

http://www.grimes.demon.co.uk/dotnet/man_unman.htm
Pretty impressive. A home-brew benchmark I did a while ago showed C# (a
pre-release of 1.0) was about about 300% slower than C code for a similarly
intensive task. (Which was still plenty performant enough for me -- I was
expecting much worse.) The FFT may be limited by the FPU pipeline,
minimizing the difference between the languages. Also, there''s no memory
(de)allocation or passing of data to/from managed and unmanaged APIs. Tasks
like this may indeed by JITed to efficient code, and most other programs on
the other end of the scale will spend time waiting for disks, networks,
users, etc. - so they''ll run just as fast. The interesting class of
programs to test would be those that are both compute and memory intensive
but not I/O bound, such as state-space searches and the like.

m

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Greg" wrote:
1.正在进行哪些工作使C#性能更接近C ++ / CLI?
我们能否期望C#等于C ++ / CLI性能?如果是这样的话?

2.还有哪些工作正在进行以改善一般的MSIL / CLR / JIT性能?作为与框架的关系,例如2.1,2.2,..是否做了这些包括性能改进?

- Greg McPherran
www.McPherran.com
1. What work is in progress to bring C# performance closer to C++/CLI?
Can we
expect C# to equal C++/CLI performance? If so when?

2. Also what work is in progress to improve MSIL/CLR/JIT performance in
general? As relases to the Framework e.g. 2.1, 2.2,.. are made do these
include performance imporovements?

--
Greg McPherran
www.McPherran.com



这篇关于C#性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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