|
|
|
|
|
by pizlonator
565 days ago
|
|
I doubt this is actually faster than NaN or why they call NuN tagging. The code sequences they cite for encoding and decoding are worse than what I expect NuN tagging to give you. If they want to convince me that their thing is faster, they should do a comparison against a production implementation of NuN tagging. Note that the specifics of getting it right involve wacky register allocation tricks on x86 and super careful instruction selection on arm. It seems that they use some very nonstandard JS implementation of NaN tagging as a strawman comparison. (Source: I wrote a lot of the NuN tagging optimizations in JavaScriptCore, but I didn’t invent the technique.) |
|
I'd add that the claim that this could be implemented in V8 doesn't take into account pointer compression, where on-heap V8 tagged pointers are 32-bit, not 64-bit.