It has been said it's OK for a .NET application to be compiled in x86 mode because pretty much the only benefit x64 gives is a larger virtual address space, thus allowing the application to allocate more than 2 (or 3) GB of memory, or memory-map very large files in their entirety.
However, a very simple test indicates that on a 64-bit machine, SHA256Managed hashes a 10 MB byte array almost twice as slowly if the application is x86 than if it is x64. So, any application that does a lot of SHA256 hashing benefits rather significantly from being "Any CPU" or having separate builds for the two platforms.
My question is: is this a typical result for .NET? Do other computationally-heavy tasks benefit similarly from running in 64-bit mode on a 64-bit OS? Of course, I could just test every specific computation, but I'd appreciate an overall "rule of thumb", such as:
- yes, anything doing lots of integer arithmetic will be much faster
- yes, all numeric computations are much faster (incl. doubles/decimals)
- no, this is a rare exception and most algorithms run at roughly the same speed in both modes