35
Most programs fit well into address space of less than 4GB, but in some cases the program may need to use new processor features/instructions that are only available on x64 architecture. Unfortunately the normal procedure would be to generate a 64-bit executable and gain the cost of the pointers to be twice the size.
There are specific applications where most data structures have a large part of their pointer elements. Big pointers will produce miss cache more frequently and if you will not use memory beyond 4GB, 64 bit pointers are pure waste.
Are there compilers where I can use specific x64 registers and instructions, but preserving the 32-bit pointers to save memory? On which platforms?
Is it possible to do this transparently in legacy code? There is a switch/flag to link this in the compiler?
If it is not possible to work with legacy code, which you need to change in code to get 64-bit resources while maintaining 32-bit pointers?
I know this is only advantageous if this memory saving is really important.
In my view this should not be a concern, because in most cases applications have a higher performance when compiled in 64-bit version. The focus must be other to obtain performance, such as caching the most used information or that have high I/O cost.
– lsalamon