views:

2526

answers:

5

Microsoft claims that the .Net 3.5 framework has many speed improvements over 2.0. Is anyone able to verify this claim?

I am especially interested in computational type stuff (math, graphics, etc), but also more generally?

+1  A: 

Seems unlikely core computational functions would see any major performance improvement without an overhaul of the CLR, which is still based on 2.0. However, I have read reports that 3.5 SP1 drastically improves application startup time (more about resource allocation and initialization than computational speed).

Rex M
+1  A: 

I know spawning threads have actually slowed down. The more threads you spawn the longer the delay. Aside from the I haven't noticed any issues.

Al Katawazi
+2  A: 

I've heard that the 3.5 JIT inlines functions and commands more intelligently than 2.0 which can really help memory swaping.

If you're curious about specific timings between versions you might want to test it out yourself with one of the (many) .NET Profilers. They're really useful to measure CPU time per-function and memory swaping in the garbage collector.

CLR Profiler: http://www.microsoft.com/Downloads/details.aspx?FamilyID=86ce6052-d7f4-4aeb-9b7a-94635beebdda&displaylang=en

dotTrace (really good but paid; 10 day trial): http://www.jetbrains.com/profiler/

Mr. Pig
+1  A: 

3.5 also adds 2.0 SP1 which replaces the JITter and the x86 platform picks up the benefit of being able to inline functions on value types, so methods like Double.Compare(Double) get inlined. If you have code which is sensitive to this (mostly number crunching), you'll see a nice speedup at runtime.

codekaizen
+4  A: 

The 3.5 CLR does seem to be faster for certain tasks.

Here's a fairly simple comparison of sorting differences on 2.0 vs 3.5, showing decent performance improvements in .Net 3.5.

http://systematicgaming.wordpress.com/2009/01/13/performance-c-vs-c-part-2/

What exactly caused the improvements is unclear, but structs were not well handled under 2.0 and inlining has improved in 3.5, both of which can make a big difference under the right circumstances.

Andrew Ellem