Re:Faster TypedArrays: Vector Addition in WebAssembly
by brrrrrm on Sunday January 02, 2022 @01:17PM
(#29771700)
Yep, you still need to bulk copy memory around if it already exists.
If you own the memory, though, you can avoid copying (wasm has "import") but you'll need to manage that manually.
I've found the cleanest approach for me is to have modules allocate space for inputs and outputs and then try to get functions to write directly into the input space.
Either way, nothing available is super friendly for user provided arrays or canvas interactions.
I've found the cleanest approach for me is to have modules allocate space for inputs and outputs and then try to get functions to write directly into the input space.
Either way, nothing available is super friendly for user provided arrays or canvas interactions.