3 ms·
This kind of hacks is a major part of how we made Scala.js' 64-bit integers fast (the fastest known implementation of 64-bit integers on JavaScript). See [1] fo
by sjrd 6y ago
This kind of hacks is a major part of how we made Scala.js' 64-bit integers fast (the fastest known implementation of 64-bit integers on JavaScript). See [1] for the implementation, and [2] at section 4.4 for the long explanation with benchmarks and the other tricks we use.
[1] https://github.com/scala-js/scala-js/blob/v1.3.1/linker-private-library/src/main/scala/org/scalajs/linker/runtime/RuntimeLong.scala https://github.com/scala-js/scala-js/blob/v1.3.1/linker-priv...
[2] https://lampwww.epfl.ch/~doeraene/thesis/doeraene-thesis-2018-cross-platform-language-design.pdf https://lampwww.epfl.ch/~doeraene/thesis/doeraene-thesis-201...