Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If the solution is based around BEAM bytecode then WASM should beat Javascript. A WASM version of the bytecode interpreter is going to be at least as fast as a JS version of the bytecode interpreter, and the AOT version will have faster startup than the JIT version too.

The caveat is that this reasoning is only thinking in terms of raw speed of executing the bytecodes. Both the WASM and JS versions will still run the elixir bytecodes in "dynamically typed speed", as the JS JIT is not able to optimize at the "elixir level". Things get a bit more complicated if you add the garbage collector to the mix though because the WASM version can't reuse the highly-efficient Javascript GC.



Right, but I'm not talking about an interpreter but about compiling BEAM bytecode to JS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: