JS: performance of numeric primops
The JS implementation of some numeric primops use JavaScript's BigInt
(see code in rts/js/arith.js
).
For performance we should replace this with code only using JS number
type.
See h$mul2Word32
for an example where we explicitly use numbers limited to 16-bit range to compute 32-bit multiplications. This was faster than allocating BigInt
s, performing a BigInt
operation, and finally converting back to number
values.
-
plusWord64 !10873 (closed) -
minusWord64 -
quotWord64 -
remWord64 -
timesWord64 -
timesInt64 -
quotInt64 -
remInt64 -
plusInt64 -
quotWord32 -
remWord32 -
quotRemWord32 -
quotRem2Word32