3

There is any difference in performance between a dll compiled in MSIL (AnyCPU) and the same dll compiled in x64?

I know my code is going to run on a 64bit server.

I'm targeting the .NET Framework 4.5

2
  • 1
    It's the exact same IL, it just has a flag in the executable saying "JIT compile this for 64 bit only". So no, there's no difference, unless you check "prefer 32-bit" (in which case it'll run as 32-bit, obviously). The only reason to pick a specific platform in managed code is because you know you'll have to load unmanaged DLLs of a particular bitness. If you don't, stick to AnyCPU (and in that case "prefer 32-bit" may or may not be a good idea depending on your application). Dec 13, 2018 at 11:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.