Question

What are the differences in performance introduced when compiling an application in 32 bit mode on a 64 architecture?

For example by using gcc with the -m32 option on a machine running a 64 bit version of Linux.

Will the program be compiled with full use of SIMD instructions?

Would the average program greatly benefit of the extra registers?

Was it helpful?

Solution

Assuming you are not making extensive use of large mmaps or the long long type the performance penalty will be a few percent at most, likely nothing significant at all. The 64 bit version will also likely be larger which could be a disadvantage anyway when considering the likelihood of causing memory paging on low resource systems. A few more registers will be available but in most programs this still has little impact on speed.

The instruction set will not be reduced as such, it will simply not use 64 bit mode of the CPU and thus not use the 64 bit extended versions of instructions.

Look here for more information on the performance implications: http://en.wikipedia.org/wiki/64-bit_computing#32-bit_vs_64-bit

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top