News for hackers. Stuff that matters.
Re:Node.js 16 Available Now by brundolf on Tuesday April 20, 2021 @03:51PM (#26880528)
What about with wasm? I assume there's a good interop story there like there is in the browser, and you don't have to worry about building for different platforms
Re:Node.js 16 Available Now by maga on Tuesday April 20, 2021 @04:12PM (#26880896)
WASM has its moments, as you can see in this[1] benchmark it outperforms JS and native addons on certain tasks.

Since the bottleneck with native addons is usually data copying/marshalling, and we have direct access to WebAssembly memory from the JavaScript side, using WebAssembly on this "shared" memory might become the best approach for computationally heavy tasks. I wrote about it a bit here[2].

[1] https://github.com/zandaqo/iswasmfast

[2] https://medium.com/swlh/structurae-1-0-graphs-strings-and-we...

Re:Node.js 16 Available Now by dindresto on Tuesday April 20, 2021 @04:14PM (#26880939)
Yup wasm is the way to go as you can just distribute the wasm binary over npm and don't have to worry about further compile steps on the consumer side, but it's not always possible to use wasm.