Hacker News new | ask | show | jobs
by Brometheus 2882 days ago
How fast is this compared to browser javascript vm "implementations" of WebAssembly?
2 comments

AFAICT WebAssembly VM is implemented in native code in the major browsers (Firefox, Chrome, Safari, Edge). It's pretty fast, and has a pretty limited interface to JS or DOM.
Native code or not shouldn't matter that much for a JIT. I've heard Cliff Click say in a talk that if he were to write another VM, it'd probably be in something like Java. The memory management of fairly arbitrary graphs like you get in a compiler really benefit from garbage collection, and it's nice to run the compiler sort of through itself to get dynamic profiling for optimization.
I mean, implementing a WebAssembly VM inside e.g. JVM is both possible and practical, but it's a very different approach from implementing it in native code, let alone any JIT approaches.
I mean, implementing a JIT is orthogonal to implementing it in another VM. See JITing meta circular evaluators like Jikes or Graal.
At least an order of magnitude slower, probably two. It doesn't even implement a JIT yet.