3 ms·
Is Wasm performance that far off of native that the difference between bundled GC and native GC is noticeable?
by seanw444 2y ago
Is Wasm performance that far off of native that the difference between bundled GC and native GC is noticeable?
- davexunit 2y agoThere are several problems with bringing your own GC. Some that come to mind: * Significantly increased binary size * No easy way to trace heap objects shared amongst many modules * Efficient GC needs parallelism, currently limited in Wasm For a more thorough explanation, see https://wingolog.org/archives/2023/03/20/a-world-to-win-webassembly-for-the-rest-of-us https://wingolog.org/archives/2023/03/20/a-world-to-win-weba...
- mdhb 2y agoI think it’s also that the V8 garbage collector already has a stupidly high bar when it comes to optimizations that shipping your own even without any consideration to WASM performance would be a step backwards for most languages running on the web.
- sethaurus 2y agoPerformance is less of a concern than binary size. Without WasmGC, you need to ship a compiled garbage collector to the user along with every WASM module written in a GC'd language. That's a lot of wasted bandwidth to duplicate built-in functionality, so avoiding it is a big win! And performance will always be a bit better with a native GC, plus you can share its scheduling with the rest of the browser process.