So I was setting up a new project in visual studio 2010 and I notice there is this option to develope either Win32 or x64 apps. I was wondering like what is the pros and cons of these two and like whats the difference I guess. I mean I would assume that x64 is better but I think that might just be my naivete of the subject getting the best of me.
Win32 vs x64 ?
Members - Reputation: 521
Posted 27 July 2013 - 10:49 AM
32-bit applications will run on both 32-bit and 64-bit versions of Windows whereas 64-bit applications will only work on 64-bit versions.
One advantage that 64-bit applications can afford is a potential performance boost and another is that they can exceed the 32-bit memory limit, allowing them to use more than 4GB (the limit varies depending on hardware and OS).
For small personal projects, it usually doesn't matter which you choose.
Members - Reputation: 1094
Posted 27 July 2013 - 11:39 AM
main advantage of x64 builds over ia32 build (named "win32" in visual studio) could be (depending on the application):
- using and access more then 2GiB of virtual memory (or 3/4 GiB with largeaddressware respectively for 32 and 64 bit version of windows)
- access to more CPU registers
- be sure that all systems run you application support SSE2 (and somthing like 99.89% support also SSE3)
- SSE2 automatic optimizations by visual studio.
- some legacy 3rd party libraries simply don't support x64
- pointers are 64 bit length instead of 32 (more memory needed and potential issues with bad coding, ie storing pointer values into integers)
- portability issues (ie: LLP64 vs LP64)
- if you don't provide a 32-bit build you could cut a lot of usage share in real word market.
Edited by Alessio1989, 27 July 2013 - 11:40 AM.
Members - Reputation: 653
Posted 27 July 2013 - 12:13 PM
I guess my next question on the topic would be, If I am writing a game to be run on a high end Nvidia graphic card set up, would I want to write that in x64. I mean if i am assuming the consumer has a rig to run it then they would probably have 64 bit OS right?
Members - Reputation: 405
Posted 27 July 2013 - 01:52 PM
Except for people aiming for a very high-tech games engine like let's say CryEngine/Unreal, you probably will never reach the memory limit and the small performance boost advantage is not worth the compatibility/portability issues you will encounter. Almost all games even nowadays are built in 32bits only, and some rare offers both the 32bits and the 64bits executable file, but I don't think I ever saw any game offering only a 64bits version. In any case, you can always switch it anytime to see how it's different during your development.
As an exercise, just look on your own computer what's installed in the "Program Files (x86)" (32bits) folder versus the "Program Files" folder (64bits). Most of what is installed in the 64bits version are Microsoft programs, drivers and some high-end applications like Autodesk's ones.
Crossbones+ - Reputation: 1400
Posted 27 July 2013 - 01:56 PM
a few years back, I was building most of my stuff for x64: "yay, finally free from the address space limits".
then I was like "but, it doesn't work on my 2003-era laptop running Windows XP...".
I then returned to doing 32-bit builds.
a few times I have considered returning to doing 64-bit builds, namely to be free again of these memory-usage limits, but generally have been finding ways to put it off (tricks to shave off memory use, ...).
granted, the usage of 32-bit OS's is fading, so it probably wont be an issue for too much longer.
Current Status / Downloads: http://cr88192.dyndns.org:8080/wiki/index.php/BGB_Current_Status
YouTube Channel: http://www.youtube.com/user/BGBTech
Members - Reputation: 1124
Posted 27 July 2013 - 03:45 PM
Perhaps not so relevant for personal projects but compiling for 64-bit usually makes your software harder to crack due to less tools being readily avaliable which support 64-bit extensions (OllyDbg for one)
Edited by Karsten_, 27 July 2013 - 03:46 PM.