3 ms·
Is this tongue in cheek? JavaScript numbers are floating point, are they not?
by nly 6y ago
Is this tongue in cheek? JavaScript numbers are floating point, are they not?
- titzer 6y agoNo, JS engines optimize heavily for small integers (31 or 32 bits) and dynamically overflow into double range as necessary.
- chrisseaton 6y agoThey aren’t literally implemented as floating point in most cases. That’d be crazy! If the number fits in an integer then a sensible implementation uses an integer.