Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 537
Numan Avatar asked Dec 15 '25 09:12

Numan


1 Answers

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.

like image 127
Steven Avatar answered Dec 17 '25 00:12

Steven



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!