I wonder if, instead of Electron->wasm->jit/aot, we could fully precompile Electron into a true native binary, eliminating much of the VM overhead. Double good if many of the object lifetimes can be resolved at compile-time, removing a substantial amount of objects that the garbage collectors must handle.
Still wouldn't be as performanct as though it were written in true C++, but I think that removing a layer of abstraction should performance (and size) benefits.
I'm unsure how much can be truly translated into static code, and how much would need to remain dynamic, though. It's an issue I'm dealing with with Ruby AOT at the moment.
Flutter is pretty much that, just a nice abstraction for Skia in AOT Dart, which is really, really fast. Once it has better desktop support I think it’ll be the new framework of choice for stuff like vscode.
1
u/Ameisen Feb 07 '19
I wonder if, instead of Electron->wasm->jit/aot, we could fully precompile Electron into a true native binary, eliminating much of the VM overhead. Double good if many of the object lifetimes can be resolved at compile-time, removing a substantial amount of objects that the garbage collectors must handle.
Still wouldn't be as performanct as though it were written in true C++, but I think that removing a layer of abstraction should performance (and size) benefits.
I'm unsure how much can be truly translated into static code, and how much would need to remain dynamic, though. It's an issue I'm dealing with with Ruby AOT at the moment.