Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any real point compiling a Windows application as 64-bit?

Tags:

I'd confidently say 99% of applications we write don't need to address more than 2Gb of memory. Of course, there's a lot of obvious benefit to the OS running 64-bit to address more RAM, but is there any particular reason a typical application would be compiled 64bit?

like image 942
Mr. Boy Avatar asked Feb 25 '10 13:02

Mr. Boy


People also ask

Are 64-bit programs better?

Simply put, a 64-bit processor is more capable than a 32-bit processor because it can handle more data at once. A 64-bit processor can store more computational values, including memory addresses, which means it can access over 4 billion times the physical memory of a 32-bit processor. That's just as big as it sounds.

Do 64-bit apps run faster?

In general, though, 64 bit code is not necessarily any faster, and is usually larger, both for code and memory usage at runtime.

Is it possible to install 64-bit applications in a 32-bit computer?

You cannot (normally) run 64 bit programs on a 32 bit OS.

Do 64-bit applications use more memory?

The short answer is yes, 64-bit operating systems almost always require more RAM than corresponding 32-bit operating systems and 64-bit applications often do require a bit more RAM than corresponding 32-bit applications.


2 Answers

There are performance improvements that might see with 64-bit. A good example is that some parameters in function calls are passed via registers (less things to push on the stack).

Edit I looked up some of my old notes from when I was studying some of the differences of running our product with a 64-bit build versus a 32-bit build. I ran the tests on a quad core 64-bit machine. So there is the question of comparing apples to oranges since the 32-bit was running under the emulation mode obviously. However, it seems that many things I read such as this, for example, consistently say that the speed hit for WOW64 is not significant. But even if that statement is not true, your application will almost certainly be run on a 64-bit OS. Thus a comparison of a 32-bit build versus 64-bit on a 64-bit machine has value.

In the testing I performed (certainly not comprehensive), I did not find any cases where the 32-bit build was faster. However many of the SQL intensive operations I ran (high CPU and high I/O) were 20% to 50% faster when running with the 64-bit build. These tests involved some fairly “ugly” SQL statements and also some TPCC tests with high concurrency. Of course, a lot depends on compiler switches quite a bit, so you need to do your own testing.

like image 102
Mark Wilkins Avatar answered Oct 13 '22 17:10

Mark Wilkins


Building them as 64-bit now, even if you never release the build, can help you find and repair problems that you will encounter later when you're forced to build and release as 64-bit.

like image 20
Ignacio Vazquez-Abrams Avatar answered Oct 13 '22 17:10

Ignacio Vazquez-Abrams