none
Is there any perfomance gain of using a specific cpu type (x86, x64) over Any CPU? RRS feed

  • Question

  • Is there any perfomance gain of using a specific cpu type (x86, x64) over Any CPU? If there is, is it significant?
    Wednesday, January 14, 2015 2:21 AM

Answers

  • Hello,

    >>Is there any perfomance gain of using a specific cpu type (x86, x64) over Any CPU? If there is, is it significant?

    As far as I know, there is no difference between a specific cpu type and any cpu because if we uses the any cpu, it depends the machine you compile your application:

    AnyCPU will compile your assembly to run on any platform. DLLs and EXEs compiled with AnyCPU option will behave with sutle difference. On a 64-bit Windows operating system, EXEs compiled with this option will execute on the 64 bit CLR, while DLLs compiled with this option will execute on the same CLR as the process into which it is being loaded. So, if a 32bit EXE load a DLL that is compiled with this option, the process is 32bit so the DLL will run on the 32bit CLR.

    x86 option compiles your assembly to be run by the 32-bit, x86-compatible common language runtime. On 32bit platform, the EXEs will run as 32bit process. On 64bit platform, the EXEs will run under WOW64 mode.

    x64 option compiles your assembly to be run by the 64-bit common language runtime on a computer that supports the AMD64 or EM64T instruction set.

    The difference exists between x64 and x86, for details, you could check this link:

    http://stackoverflow.com/a/11062102

    By the way, this issue is related Visual Studio setting, I suggest you could post VS related issues to Visual Studio forum.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by IffIfanoff Thursday, January 15, 2015 9:37 AM
    Wednesday, January 14, 2015 11:33 AM
    Moderator

All replies

  • Hello,

    >>Is there any perfomance gain of using a specific cpu type (x86, x64) over Any CPU? If there is, is it significant?

    As far as I know, there is no difference between a specific cpu type and any cpu because if we uses the any cpu, it depends the machine you compile your application:

    AnyCPU will compile your assembly to run on any platform. DLLs and EXEs compiled with AnyCPU option will behave with sutle difference. On a 64-bit Windows operating system, EXEs compiled with this option will execute on the 64 bit CLR, while DLLs compiled with this option will execute on the same CLR as the process into which it is being loaded. So, if a 32bit EXE load a DLL that is compiled with this option, the process is 32bit so the DLL will run on the 32bit CLR.

    x86 option compiles your assembly to be run by the 32-bit, x86-compatible common language runtime. On 32bit platform, the EXEs will run as 32bit process. On 64bit platform, the EXEs will run under WOW64 mode.

    x64 option compiles your assembly to be run by the 64-bit common language runtime on a computer that supports the AMD64 or EM64T instruction set.

    The difference exists between x64 and x86, for details, you could check this link:

    http://stackoverflow.com/a/11062102

    By the way, this issue is related Visual Studio setting, I suggest you could post VS related issues to Visual Studio forum.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by IffIfanoff Thursday, January 15, 2015 9:37 AM
    Wednesday, January 14, 2015 11:33 AM
    Moderator
  • Fred Bao, thank you for your thorough answer.
    Thursday, January 15, 2015 9:43 AM