3 ms·
> WebAssembly enables predictable and stable performance because it doesn’t require garbage collection like the usual options (LUA/JavaScript). GC is a small p
by azakai 6y ago
> WebAssembly enables predictable and stable performance because it doesn’t require garbage collection like the usual options (LUA/JavaScript).
GC is a small part of that - the much bigger factor is dynamic optimization is necessary for fast Lua or JavaScript. Wasm is designed to not need that (like most languages that are not dynamically typed).
- wffurr 6y agoSome wasm runtimes, eg V8 and Spider monkey, do tiered compilation, where all code is first compiled with a high throughput streaming compiler, and then only the hot paths get recompiled with an optimizing compiler.
- azakai 6y agoTrue, good point! Tiered compilation in general does dynamic optimizations, definitely in JavaScript (runtime type collection, etc.) but also to a lesser extent in C# or Java (inlining, etc.). In wasm none of the tiers do dynamic optimizations AFAIK, but tiered compilation definitely helps there too, mostly with startup times.