2 ms·
tl;dr The inode is a 64-bit integer which the high-level JS language doesn't have. They could (1) make a two element UInt32Array or (2) use strings or (3) use
by paulddraper 10y ago
tl;dr The inode is a 64-bit integer which the high-level JS language doesn't have.
They could (1) make a two element UInt32Array or (2) use strings or (3) use all 64 bits of the floating point JS number type.
- rossy 10y agoIt's worth pointing out that (3) sounds good, but it's an imperfect solution too. If Number.isNaN(num) is true, num === num will be false. Not just one, but several 64-bit patterns are considered NaN when represented as a floating-point number, so if all possible 64-bit values can be used, this could cause the opposite problem where inodes that are actually the same are considered not equal by JavaScript.