News for hackers. Stuff that matters.
Re:Bill Gates: “I never said '640K should be enough for anyb... by huntie on Tuesday October 02, 2018 @08:51AM (#18121037)
Other people have pointed out how much memory 64bits provides, but the real problem is when we go from 48bits to 64bits. 48bits provides 256TB of address space. Right now amd64 only uses the bottom 48bits for pointers and some systems take advantage of this for things like NANboxing. I don't really know the numbers, but losing the ability to NANbox will probably come with a performance hit.
Re:Bill Gates: “I never said '640K should be enough for anyb... by vetinari on Tuesday October 02, 2018 @11:07AM (#18122356)
NaN-boxed or tagged pointers have to be processed before use anyway - amd64 enforces canonical pointers, even if the high bits are unused (they have to be set to 1).

Aarch64 on the other way...

Re:Bill Gates: “I never said '640K should be enough for anyb... by huntie on Tuesday October 02, 2018 @11:18AM (#18122454)
What's your point? A few bitwise operations are far quicker than reading from memory. Also are you sure that the high bits must be 1? I thought they had to be the same as the 48th bit.
Re:Bill Gates: “I never said '640K should be enough for anyb... by vetinari on Tuesday October 02, 2018 @11:33AM (#18122618)
You are right - they can be 0 & copy of bit 47.

The point was, that there will be not a problem with tagged pointers. The pointers have to be clean today when used, so those who use tagged pointers have a place in their code where they handle the cleaning.

Re:Bill Gates: “I never said '640K should be enough for anyb... by hinkley on Tuesday October 02, 2018 @12:35PM (#18123241)
I believe the new garbage collector for the JVM colors pointers in a way they are not scrubbed before use; they memory (re-)map into multiple regions to implement read and write barriers.

Some very old distributed systems used 64 bit pointers where the upper bits told you what machine the data was on.

And we have Intel putting SSD card in DIMM slots. I expect there are semantics attached to those address ranges as well.

I dunno where we are after Spectre, but one of the microkernel architectures got its IPC speed by packing most processes into a couple of address spaces, only with different read write access. On preemption the TLB wasn’t invalidated (about half the cost), just modified.

These are the sorts of tricks you do when your address space is bigger than you will ever need. I expect to see more of this as time goes on. And if we ever see 128 bit pointers, expect crazy stuff like this to be de rigeur.

Re:Bill Gates: “I never said '640K should be enough for anyb... by ken on Tuesday October 02, 2018 @11:40AM (#18122684)
NANboxing isn't the only strategy for type tagging. We've been using tagged pointers in 32-bit land for decades. I doubt the perf hit here is going to be significant.
Re:Bill Gates: “I never said '640K should be enough for anyb... by bzbarsky on Tuesday October 02, 2018 @03:02PM (#18124643)
The reason NaN-boxing is popular for JS is that the only numeric type in JS (per spec, though JITs can sometimes improve on this) is 64-bit IEEE float, and it sure is nice if your value format can represent those directly without requiring a separate heap allocation.

There are still things you could do, of course. For example, you could more or less NaN-box but rotate the bits so the tag is in the lowest bits instead of up in the exponent, then ensure all your pointers are sufficiently aligned. That would mean a perf hit on doubles to do the rotation to recover the double, but you might be right that this is not too bad in practice on modern hardware.