4 ms·
I've implemented support in the Scala.js compiler to emit Longs (64-bit signed integers) as BigInts about 6 weeks ago. [1] Unfortunately, without specific optim
by sjrd 8y ago
I've implemented support in the Scala.js compiler to emit Longs (64-bit signed integers) as BigInts about 6 weeks ago. [1] Unfortunately, without specific optimizations that are not part of the baseline currently implemented in V8, this implementation is very slow. It's up to 60x slower than our production implementation. [2] I'm looking forward to seeing small BigInts being optimized as native 64-bit values!
[1] https://github.com/scala-js/scala-js/pull/3286/commits/deec9719033f4ce21331eeca864182f17898831b https://github.com/scala-js/scala-js/pull/3286/commits/deec9...
[2] https://github.com/tc39/proposal-bigint/issues/117 https://github.com/tc39/proposal-bigint/issues/117
- Rapzid 8y agoI hope that after they collect feedback Int64 shows as a significant enough use case to prioritize optimization.