long.js
long.js copied to clipboard
Add multiply-add / multiply-sub (MADD / MSUB) operations. Also implemented sub / add wasm versions
Given that mul
is already performed in Wasm and that add
/ sub
aren't so slow, and given the scope of this package, I'm wondering if extending the API with rather uncommon methods as proposed here is worth it?
mul + add
pretty common operation which could be speedup by calling only once instead two (which also required unpack same arguments twice). For example. I could remove rest wasm methods like msub, add and sub
which added with this PR if you don't see any sense for it.
Having a feeling that peak perf isn't the right motivation in context of this library. In practice it still emulates so fusing two ops seems neglectable?