tags:

views:

276

answers:

3

As mentioned in this question/comments there are certain disadvantages when moving from 32 bit .NET to 64 bit .NET.

Probably the biggest advantage is the much bigger process address space in the 64 bit world, but what other pros and cons are worth noting?

+6  A: 

I've seen it to be noticeably faster (~ 4x in my experience) for some computationally-heavy (number-crunching) applications. The best thing is it comes for free in pure managed cases. You don't even have to recompile anything to get the benefits. Also, I've heard that the x64 JIT has more aggressive optimizations.

The biggest disadvantage is probably not being able to load 32-bit COM components in process.

Mehrdad Afshari
+3  A: 

The other downside is that Visual Studio for x64 applications has some limitations:

  • Edit and Continue is not available for 64-bit debugging.

  • You cannot debug in mixed-mode, calls from native code to managed code, or vice versa, in 64-bit code.

See: http://msdn.microsoft.com/en-us/library/ms184681(VS.80).aspx

Note: The 64 bit compilers aren't installed by default. You have to select them during the install.

I also just found this (because I'm optimising a x64 application myself).

"Porting and Optimizing Applications on 64-bit Windows for AMD64 ..."

http://download.microsoft.com/download/5/b/5/5b5bec17-ea71-4653-9539-204a672f11cf/AMD64_PortApp.doc

Has lots of good pointers on compiler switches and the like.

Ade Miller
"64 bit compilers aren't installed by default": The OP is talking about .NET applications. This is only true for native C++ compiler and not for VB.NET/C#.
Mehrdad Afshari
+1  A: 

64 bit apps will not always run faster than 32 bit. The two blog posts below talks about it:
http://blogs.msdn.com/rmbyers/archive/2009/06/08/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx

Larger pointers means more memory and cache consumption, and the number of bytes of CPU cache available is the same for both 32-bit and 64-bit processes.

http://blogs.msdn.com/ricom/archive/2009/06/10/visual-studio-why-is-there-no-64-bit-version.aspx

A 64 bit address space for the process isn’t going to help you with page faults except in maybe indirect ways, and it will definitely hurt you in direct ways because your data is bigger. In contrast a 64 bit operating system could help you a lot! If you’re running as a 32 bit app on a 64 bit OS then you get all of the 4G address space and all of that could be backed by physical memory (if you have the RAM) even without you using 64 bit pointers yourself.

Ohad Horesh