I know that .NET is JIT compiled to the architecture you are running on just before the app runs, but does the JIT compiler optimize for 64bit architecture at all?
Is there anything that needs to be done or considered when programming an app that will run on a 64bit system? (i.e. Will using Int64 improve performance and will the JIT compiler automatically make Int64 work on 32bit systems?)
The 64bit JIT is different from the one for 32bit, so I would expect some differences in the output – but I wouldn’t switch to 64bit just for that, and I wouldn’t expect to gain much speed (if any) in CPU time by switching to 64bit.
You will notice a big performance improvement if your app uses a lot of memory and the PC has enough RAM to keep up with it. I’ve found that 32bit .NET apps tend to start throwing out of memory exceptions when you get to around 1.6gb in use, but they start to thrash the disk due to paging long before that – so you end being I/O bound.
Basically, if you’re bottleneck is CPU then 64bit is unlikely to help. If your bottleneck is is memory then you should see a big improvement.
Int64 already works on both 32bit and 64bit systems, but it’ll be faster running on 64bit. So if you’re mostly number crunching with Int64, running on a 64bit system should help.
The most important thing is to measure your performance.