3 ms·
> reconfirm those bits afterwards Thanks - I hadn't thought about that but it seems to be the main downside of this approach. The benefit of NaN-boxing is that
by pansa2 2y ago
> reconfirm those bits afterwards
Thanks - I hadn't thought about that but it seems to be the main downside of this approach. The benefit of NaN-boxing is that it reassigns values that are otherwise unused - floating-point calculations will never generate NaNs with those bit patterns.
- AlotOfReading 2y agoAn additional wrinkle is that NaNs are a bit unstable and can have large performance penalties. You can't let the NaNs ever escape into arithmetic and you may even have issues even storing them in a register.