long.js icon indicating copy to clipboard operation
long.js copied to clipboard

Add multiply-add / multiply-sub (MADD / MSUB) operations. Also implemented sub / add wasm versions

Open MaxGraey opened this issue 3 years ago • 3 comments

MaxGraey avatar Jul 14 '20 10:07 MaxGraey

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?

dcodeIO avatar Jul 14 '20 14:07 dcodeIO

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.

MaxGraey avatar Jul 14 '20 14:07 MaxGraey

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?

dcodeIO avatar Oct 28 '21 07:10 dcodeIO