Reputation: 59
We have a C#.NET application (framework 2.0, VS 2008) compiled in 32 bit and 64 bit platform.
Performance is degraded in 64 bit application compared to 32 bit.
It is taken almost 10-15 seconds more to load compared to 32 bit application. we are not doing anything specific with code based on the platform. we are using some registry operations, xml reading and some basic stuffs on start-up of the application.
No issues with 32 bit app, compiled in x86 platform.
I tried "NGEN Update" and it improved the performance slightly, but still I need suggestion how we can improve the performance for this app.
Upvotes: 2
Views: 841
Reputation: 77304
It is taken almost 10-15 seconds more to load compared to 32 bit application
Code is compiled from IL code to machine code on the target machine. For 32bit, developers assumed that this would be a desktop interactive application and wrote a JITter (Just-In-Time compiler) that compiles for optimized startup time, sacrificing some runtime benefits. For 64bit applications, developers assumed this to be non-interactive server applications. So the JITter will compile optimizing for runtime performance, sacrificing startup speed.
This has not changed in later versions and only recently became an issue when more and more consumer products were running 64bit versions of Windows.
Microsoft brought in .NET Native because the modern phones, where startup time is key, all run 64bit systems. Who would have thought that back in time when the JITter was written.
Upvotes: 2