As I wanted to benefit from new multicore threading improvements from .Net Framework 4, I recompiled all of my solution projects from 3.5 to 4.Everything compiled Ok.
But what was my surprise to see that my application runs much slower when compiled in .Net 4 compared to 3.5. I was not expecting that at all. It is a scientific processing App, so computing time is what it's all about. I have no clue where to start from, and for the time being, and I prefer to think that I have missed something during the migration process, that is fixable, rather than t开发者_JS百科he App is "per se" running slower in .4 (can't see any logical reason for that...)Any Ideas are Welcome
here's a small checklist for you:
- Check, if you are using a Release Build - maybe you've done a Debug Build
- Check, if all performance optimizations are turned on in the project file.
- Check your target platform, if it maybe is set to x86.
- Did you change your code? Compare both versions, if there are significant differences? e.g. are you using Linq?
- Go and get a Profiler for testing. I would recommend ReSharper dotTrace.
Hope that I could help you
I suggest you use a profiler on both versions and compare the results. It might give you a starting point
精彩评论