Re:Moving from TypeScript to Rust / WebAssembly
by CryZe on Thursday July 09, 2020 @03:30AM
(#23777822)
On algorithmic code, idiomatic Rust + WASM is often about 10 to 40 times faster than idiomatic JS. The problem however is that each call between WASM and JS has a hefty cost of about 750ns. So your algorithm needs to be doing a significant amount of independent calculations before you will see these performance differences.
[ Parent
| on HN ]
Re:Moving from TypeScript to Rust / WebAssembly
by MaxBarraclough on Friday July 10, 2020 @05:46AM
(#23789742)
> each call between WASM and JS has a hefty cost of about 750ns
Why is this the case? Can we expect it to go away as browsers mature?