开发者

.NET 4.0 slower than earlier versions, is that true? [duplicate]

开发者 https://www.devze.com 2023-01-02 12:29 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Are .NET 4.0 Runtime slower than .NET 2.0 Runtime?
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Are .NET 4.0 Runtime slower than .NET 2.0 Runtime?

Hello All,

We are planning to move to .NET framework 4.0 sometime soon... I don't remember the refernce or link, but recently, I read about the latest framework being a little slow in performance when compared to its predecessors.

开发者_开发技巧

Is that true? has anybody done any tests or have some valid arguments to support this?


It is impossible to make a general statement about the performance of .NET 4.0 compared to earlier versions. Microsoft is constantly improving the framework, thus making performance improvements. Performance is improved both in the BCL as in the runtime itself. For instance, cold startup time is improved dramatically and the performance of the GC has improved both in 3.5sp1 and in 4.0. On the other hand, the framework is getting bigger and this means more code. More code means more page misses, means slower performance.

On the other hand, .NET 4.0 introduces new techniques that that can drastically improve the performance of your code (such as the TPL). And don’t forget that new techniques will be introduced that improve the developer performance, which is the most important part of all.

So don't get influenced by sentiment and gossip. Even if .NET 4.0 is slower, this shouldn't worry you. You should benchmark if that part of the framework is fast enough for your requirements. If it isn't, you can always come back here at SO and ask how that particular scenario can be improved. It is almost always possible to get around it.


I'm running .NET 4.0 with VS2010. The compiled apps seem to run decently, however the development IDE was built using WPF (afaik) and is extremely slow. So slow that I've become prejudiced against WPF as a viable UI solution for my own projects. It seems WPF is good for small stuff but doesn't scale up to larger and more complex UI very well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号