Wait but why?

  • The JavaScript specification (ECMA 262) says that all numbers should behave like 64 bit doubles
  • JavaScript does not allow for direct memory access / weird type casting though...
  • FP operations are often slower than integer operations
  • Integers are very common
  • SOME floating point operations are exactly the same as integer operations
  • V8 uses 2s complement integers in some cases and floating point numbers in others
  • Needs to change representations seamlessly in all cases

12 / 24