News for hackers. Stuff that matters.
Re:Is WebAssembly magic performance pixie dust? by sime2009 on Wednesday April 14, 2021 @06:06AM (#26804991)
My general worry is that the performance gains from using some WASM will just get eaten up by the overhead of jump between JS and WASM and having to copy/convert data. You might be able reduce the problem by porting more stuff from the JS side to the WASM side, but then you risks pulling in huge chunks of your app.
Re:Is WebAssembly magic performance pixie dust? by elenchev on Wednesday April 14, 2021 @07:37AM (#26805654)
JS <--> WASM function calls are not an issue[1], passing large amounts of data is though.

1. https://hacks.mozilla.org/2018/10/calls-between-javascript-a...

Re:Is WebAssembly magic performance pixie dust? by sime2009 on Wednesday April 14, 2021 @07:55AM (#26805822)
Does anyone know if that is also the case on V8?
Re:Is WebAssembly magic performance pixie dust? by flohofwoe on Wednesday April 14, 2021 @08:21AM (#26806070)
JS/WASM calls are fast in V8, and still seem to be improved from time to time (e.g. see: https://v8.dev/blog/v8-release-90#webassembly), not sure about any large data optimizations (TBH I'm not sure what this is about though, because usually one would use JS slices into the WASM heap to avoid redundant copying)
Re:Is WebAssembly magic performance pixie dust? by cdcarter on Wednesday April 14, 2021 @12:21PM (#26809241)
That works if the data is already in the Wasm linear memory and you need to access it from JS. If you have strings (or whatever) in JS, you need to copy them into the linear memory for the Wasm module to use.
Re:Is WebAssembly magic performance pixie dust? by alpaca128 on Wednesday April 14, 2021 @06:22AM (#26805094)
Any real performance gains will easily be balanced out by websites doubling their size once again, WASM or not.