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 !12125 (closed) -
quotWord64 -
remWord64 -
timesWord64 !12125 (closed) -
timesInt64 !12125 (closed) -
quotInt64 -
remInt64 -
plusInt64 !12125 (closed) -
minusInt64 !12125 (closed) -
quotWord32 -
remWord32 -
quotRemWord32 -
quotRem2Word32
Edited by Sylvain Henry