News for hackers. Stuff that matters.
Re:Float Self-Tagging by adgjlsfhk1 on Wednesday November 27, 2024 @11:51PM (#42262562)
50% means you only get 1 tag bit.

also you totally can fit 64 bit pointers inside a NaN. 46 bit pointers are only 48 bits and you have 53 bits of NaN payload. (you also could get an extra 3 bits if you only allow storing 8 byte aligned pointers unboxed)

Re:Float Self-Tagging by pansa2 on Thursday November 28, 2024 @12:04AM (#42262621)
> 50% means you only get 1 tag bit.

That's enough to distinguish between "unboxed float" and "something else", where the latter can have additional tag bits.

> [64-bit] pointers are only 48 bits and you have 53 bits of NaN payload.

The paper specifically talks about support for "high memory addresses that do not fit in 48 bits".

Re:Float Self-Tagging by dzaima on Thursday November 28, 2024 @09:33AM (#42265532)
Of note is that even if you have some massive ≥2^48 data sources, you could still quite likely get away with having NaN-boxed pointers to within the low-size heap, with an extra indirection for massive data. This only would break apart if you managed to reach around 2^45 distinct referenceable objects, which you probably shouldn't ever have (esp. in a GCd language).