No, there is no difference in performance between AnyCPU application running on a 64-bit Windows and an x64 application running on it. The only thing that flag changes are some flags in the header of the compiled assembly and the CLR uses it only to decide whether to use x86 or x64, nothing else
If you were asking whether there is a difference between x86 application running on a 64-bit Windows and an x64 (or AnyCPU), then the answer would be yes. The differences between the two are:
- 64-bit obviously uses references that are twice as big as 32-bit, which means larger memory consumption, but it also means you can use more memory
- 64-bit can use more registers that are available only in the 64-bit mode of CPUs
- 64-bit JIT is different from 32-bit JIT, it has different set of optimizations: for example 64-bit JIT sometimes uses the tail call optimization even if you don’t specifically request it using the
tail.
instruction (which for example C# never does)