|
|
|
|
|
by flohofwoe
2903 days ago
|
|
Looks like this is mostly running interpreted "Emterpreter" byte code (the .wasm blob is about 52 KByte, but there's a 1.9MBytes emterpretify.data file, which (I guess from the size) contains the bulk of the logic. If this is indeed true it doesn't really use WebAssembly's strengths, since only the bytecode interpreter is running in WebAssembly, while vim itself is running interpreted. Emterpreter was added to emscripten to workaround the problem in the browser runtime that you can't execute long-running blocking functions from within the browser loop. Emterpreter essentially allows to yield and continue from the middle of C code, however it's intended to only run as little code as possible like this (for instance only in the outer event-loop of an application), and call into asm.js or wasm code, where the actual work should happen. Again, whether this vim demo works like this is speculation on my side, based on the relative sizes of the .wasm and emterpretify.data file sizes :) |
|