3 ms·
A machine word/pointer as wide as 72 bits would already solve a lot of problems that appear in e.g. dynamic languages nowadays, such as an inability to represen
by phoe-krk 5y ago
A machine word/pointer as wide as 72 bits would already solve a lot of problems that appear in e.g. dynamic languages nowadays, such as an inability to represent an IEEE double float (64 bits wide) as a value without any sort of type tagging.
Still, I don't think anyone nowadays would settle for a non-power-of-2 machine word size, even if just for backwards compatibility and even if a pointer is limited to e.g. 72 bits out of all 128. If that is the case, then another use could be a "fat pointer" that was proposed somewhere in the C world to avoid passing raw pointers without their lengths.You could pass a length of an array along with its address as long as the length of your array can fit in e.g. 56 bits, which would be enough for most use cases if we feel like going into the "640kB is enough for everyone" route again.
- convolvatron 5y agoif you lay out your virtual memory space correctly on a little endian machine you can use the denorm space (assuming you don't care about underflows) for the actual memory and have floats and the rest of your world coresident in 64 bits.
- titzer 5y agoJSC, Chakra, and Spidermonkey use NaN-tagging for values; 32 bit integers, 52-bit pointers, and 64-bit doubles are all encoded into one word, with the former two using encodings that fall into the NaN space.