2 ms·
Web assembly isn't inherently faster than well-optimized Javascript. You save the parsing and compilation overhead of JS, but right now the focus with web assem
by fabian2k 7y ago
Web assembly isn't inherently faster than well-optimized Javascript. You save the parsing and compilation overhead of JS, but right now the focus with web assembly isn't on speed yet.
You also can't just compile any Javascript to WASM, the closest thing to this is AssemblyScript:
https://github.com/AssemblyScript/assemblyscript https://github.com/AssemblyScript/assemblyscript
This compiles a subset of Typescript to web assembly. And you have to take "subset" seriously here, web assembly is very limited in how memory is managed, you can't just drop your Javascript in there and get web assembly out.