Question

I have a .Net4 WinForms app that references 3rd party .Net2 assemblies, which contain graphics-heavy visual controls. I've noticed a huge improvement in app's visual performance when I accidentally switched it from AnyCpu to x86 compilation mode. My development rig is a x64 Windows 7. The improvement is by a factor of at least two when controls are rendering their graphical elements.

Is this a known fact or am I doing something wrong?

Was it helpful?

Solution

See these two articles about it:

AnyCPU Exes are usually more trouble than they're worth

Visual Studio: Why is there no 64 bit version? (yet)

See also this post about 64-bit code: Should I choose to take advantage of 64-bit?, it clearly states that for example Paint.NET works better under in 64-bit mode, because the developer optimized the code for 64-bit.

So, I don't think you are doing something wrong, but maybe the 3rd party .NET assemblies you're using could be improved specifically when running in a 64-bit process.

OTHER TIPS

This wouldn't surprise me. When you set the application to compile to "Any CPU", the CLR generates an application that the jiter on the user's machine must further compile to best fit their architecture. If you set it to "x86", your dev compiler compiles the application for an x86 machine, which reduces the load of the clients jiter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top