|
|
|
|
|
by readittwice
3393 days ago
|
|
Sure, Anders is great but this not so easy. Basically you would have to re-implement all the features and optimizations of current JS-Engines.
In WASM you are restricted to the given (statically-typed) opcodes, while a JS-JIT has more knowledge about program semantics and can thus apply optimizations more easily.
In addition the JIT can also make use of hand-written assembly if it is needed for best performance. I think JRuby does a similar thing for Ruby and Java Bytecode. TruffleRuby shows that it is possible to be faster, they do not compile to bytecode and use their own compiler. |
|