3 ms·
Wasm = just a bunch of bytecode executing in a VM / a sandbox. Even with JIT, it will still be slower than the native code. And since it is a sandbox.. either
by saidinesh5 4y ago
Wasm = just a bunch of bytecode executing in a VM / a sandbox. Even with JIT, it will still be slower than the native code.
And since it is a sandbox.. either you, or your friendly wasm interpreter (via. wasi etc...) needs to provide the system access APIs for various things like storage/filesystem access, hardware acceleration via. GPU, TPU etc.. And some of the standard APIs we take for granted.
- skohan 4y agoIs WASM typically interpreted? I would have assumed one of the advantages of an assembly language is it would be easy to JIT compile down to machine code.
- saidinesh5 4y agoThat depends on the runtime. Some runtimes like wasmtime support both JIT and AOT compilation. And for places where you can't use JIT compilation (like iOS... - which is where most of the users/developers of our app were) there are interpreters like wasm3.
- skohan 4y agoIs wasm3 built in to iOS, or is that something you have to bundle with your app?
- saidinesh5 4y agoWasm3 is just an interpreter you can/have to bundle with your app. There was supposed to be a way to use the webassembly interpreter from JSCore but i am afraid my iOS knowledge doesn't go that far.