Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I provide an x64 build of my application?

Perhaps I'm missing a major point of the x64 platform here, but my perception was that x64 applications were only better performing than x86 versions (on an x64 OS and hardware, obviously) when large amounts of memory, large pointers, or other demanding factors were involved.

However, I've started to notice some smaller applications offering x64 versions of their installers in addition to the standard x86 versions. Since x86 runs just fine on Windows x64 using WoW, is there any benefit to me releasing an x64-compiled version of my application? As I see it:

Pros:

  • Potentially higher performance (in what conditions, though)

Cons:

  • Additional build to create/support
  • Potential bugs in x64 target that aren't present in the x86 target
  • Dependence on x64 versions of vendor/OS DLLs, requiring different install checklist and introducing additional troubleshooting complications

What are some compelling reasons that should cause me to reconsider adding an x64-compiled version of my app?

like image 441
SqlRyan Avatar asked Jan 02 '10 05:01

SqlRyan


People also ask

Should I build for x86 or x64?

So, target x86 or x64. Since x86 apps run on both x64 and x86 systems, the most compatible choice is to build x86. If you MUST build a 64 bit solution, you'll need to target x64 and use our x64 dlls.

Should I use x64?

Do I Need 64-Bit Windows? For most people, 64-bit Windows is today's standard and you should use it to take advantage of security features, better performance, and increased RAM capability. The only rare reasons you'd want to stick with 32-bit Windows are: Your computer has a 32-bit processor.

Are x64 apps faster?

² Performing a 64-bit operation on a 64-bit operating system is faster than performing it on a 32-bit operating system - it would take at least 2 32-bit operations to perform the same thing. Stability wise there should be no difference between 64-bit and 32-bit applications.

What does x64 mean on software?

A 64-bit processor refers to a microprocessor that can process data and instructions in chunks of 64 bits. Microprocessors that can handle 64 bits perform a larger number of calculations per second compared to 32-bit processors.


3 Answers

Another potential reason for compiling and debugging an x64 version is that it may expose hidden bugs in the x86 version. For example, this may expose improper conversions between 32-bit integers and (now) 64-bit pointers. This also positions you to support x64 in the future.

However, unless your application would benefit from 64-bit integers, additional cpu registers, a larger memory space (beyond 3.5Gb), or implement a device driver, staying with 32-bit application is fine. All major operating systems support running both x32 and x64 applications at the same time so there will not be a major push towards 64-bit only applications.

BTW. Applications based on .NET automatically benefit from being executed on a 64-bit system without any code changes. No additional testing required.

like image 159
tgiphil Avatar answered Sep 30 '22 16:09

tgiphil


Potential performance improvement relates mostly to usage of 64-bit integers (around 4 times as fast in an x64 build on my machine than in x86 on the same) and the fact that compilers may assume some CPU features to be universally present in CPUs supporting x64, such as SSE2, &c.; this can lead to more optimized code.

For many applications, especially small ones it isn't too difficult to be 64-bit clean, for larger ones it's a major headache, granted. Compelling reasons are few, usually. But some platforms don't install their 32-bit support in 64-bit versions by default (I think FreeBSD needs to be explicitly told to do so, but I may err on that).

like image 37
Joey Avatar answered Sep 30 '22 18:09

Joey


Your program will benefit if it uses a lot of long longs and WOW does of course mean a minor performance hit(very minor though because the CPU has a compatibility mode for such this reason)...

Windows support for 32 bit programs will be degrading in the future(albeit slowly) so I say in another year or 2, you can just about wonder why you would want to deploy a 32 bit application...

Also, a 64 bit build of your application, can actually be much more optimized than a 32 bit build because with 64 bit, you are guaranteed to have quite a few things, such as SSE2.

like image 34
Earlz Avatar answered Sep 30 '22 18:09

Earlz