[MLton] 64-bit pointers
Wesley W. Terpstra
wesley@terpstra.ca
Mon, 5 Sep 2005 04:09:58 +0200
On Sep 5, 2005, at 3:25 AM, Matthew Fluet wrote:
>> BTW, I've drifted over to the belief that simple 64bit
>> pointers are best. Since amd64 is backwards compatible,
>> there's no real problem for applications needing << 4GB.
>> Just compile your program for i386 instead of amd64.
>>
>> I doubt that applications needing 4GB to 32GB will last
>> very long in the history of computer evolution.
>
> The typical ML heap is predominately pointers, so naively going
> from 32-bit pointers to 64-bit pointers will almost double your
> memory requirements. So it is the programs needing close to 4GB
> memory that suffer, because they'll need close to 8GB.
I think you've misunderstood what I meant...
I meant, for apps needing less than 4GB, 32 bit is the best option.
For apps needing more than 32GB, you'll have to use either 40bit
or 64bit pointers from the list of Stephen... 40 bit doesn't seem to
be very nice to me, so I imagine at this point you will use 64bit
pointers.
It is clear that using 64bit pointers will double the memory foot
print of the application. However, what I was trying to say, is that
the range during which these optimizations will be useful is only
between 4GB and 32GB. In the future, I don't imagine computers
to stay in this range of RAM for more than six to ten years.
Once computers have 32GB of RAM, you application either needs
all the RAM it can get (ie: use 64bit pointers) or it needs less than
the computer has, in which case the 2* overhead is likely irrelevant.
I hope that helps my comment sound less opaque.