CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: x86 vs x64

  1. #1
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    x86 vs x64

    When using Visual Studio 2008, under Project properties tab Build you can set the 'Platform target' to x86, x64 or Any CPU.

    I never paid eny attention to this, untill now, because my OS changed from x86 to x64. When I compile an application with platform target 'Any CPU', does this mean that my application runs both under x64 and x86, or should I compile 2 diferent versions, 1 for x64 OS and 1 for x86 OS?

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: x86 vs x64

    "Any CPU" will generate MSIL that can JIT to either environment, but take no advantage of either. x86 and x64 force that environment [and x86 will run on an x64 platform, but as a 32 bit application.

    Just remember that (in general) x64 means bigger and slower applications.

    What you GAIN is a larger virtual address space. If your machine has <=4GB of RAM, you are likely to see an overall performance decrease. The same applies if your "typical running condition" is under 3GB total virtual address space.

    The benefits (again, typically) start to appear when you have 8GB-64GB (or more) on RAM on your machine.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: x86 vs x64

    Does it mean that x86/x64 build doesn't produce IL code, in other words, output assemblies are like processed with ngen.exe? (A have no experience with this, I have never need it, But I'm courious).
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: x86 vs x64

    Quote Originally Posted by boudino View Post
    Does it mean that x86/x64 build doesn't produce IL code, in other words, output assemblies are like processed with ngen.exe? (A have no experience with this, I have never need it, But I'm courious).
    Not at all. It is ALWAYS MSIL.

    The different targets will (most likely) produce Different MSIL, but even more critically will include metadata that is specific to the target and used by the Loader & JIT.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured