3 ms·
"31 bits... is the widest range that can be guaranteed to be efficiently representable on all platforms." This is because JS numbers are encoded as double floa
by djur 5y ago
"31 bits... is the widest range that can be guaranteed to be efficiently representable on all platforms."
This is because JS numbers are encoded as double floats, and the most efficient representation of an integer in v8 is a "SMI (small integer)", a 31-bit signed integer: https://medium.com/fhinkel/v8-internals-how-small-is-a-small-integer-e0badc18b6da https://medium.com/fhinkel/v8-internals-how-small-is-a-small...