Hacker News new | ask | show | jobs
by azakai 726 days ago
The two posts make the most sense together, yeah.

I was involved in this work (happy to answer any questions). Overall we started from a large slowdown compared to JS, worked hard, and ended up with a large speedup over JS of around 2x. So right now it is a big improvement over JS.

That improvement required work across the codebase, the toolchain, and the VM. Most of it is not specific to Java and also helps other WasmGC projects too (like Dart and Kotlin). We are also working on further improvements right now that should make things even faster.

4 comments

Oh, you were involved as well. Well then, no wonder things worked out!

(I remember you from your work with asm and emscripten and the various ports you did, which I played around with)

No specific question(right now), I just want to say, I admire your work.

Oh, thanks!

Yeah, I was involved here on the toolchain side. We did a lot of work on the Binaryen optimizer for WasmGC.

You must be Alon Zakai, one of the original developers of Web Assembly, if not THE original developer of Web Assembly?
That's my name, yeah, but I'm just one of the people involved in WebAssembly's creation.
Don't be soooo modest :)
Well done on the accomplishment -- no small feat to improve runtime 50% in a mature codebase.

I'm interested more in learning how to work within wasmgc. Do you have any resources you'd point to for someone looking to pick it up?

This post might help:

https://v8.dev/blog/wasm-gc-porting

See in particular the "getting started" section near the end:

https://v8.dev/blog/wasm-gc-porting#getting-started

At a lower level the overview in the WasmGC github repo is very good:

https://github.com/WebAssembly/gc/blob/main/proposals/gc/Ove...

Great work Alon! Yet another case of impressive engineering. I have a couple of questions:

1. How is the landscape of wasmGC browser support? Given it's relatively new is it OK to use this and ship production apps now? How does sheets handle older/unsupported browsers?

2. In Google IO the Workspace team mentioned they'd leverage Kotlin Multiplatform to achieve use cases like this. I see Sheet's using the in-house J2CL compiler but is there cases where KMM is used to target WASM - in sheets or docs? What are your thoughts?

For current support, see

https://webassembly.org/features/

Chrome (and other Chromium-based browsers) and Firefox have had WasmGC enabled for a few releases now. But Safari doesn't yet last I heard.

Sheets can serve a JS version to browsers without WasmGC, since they can compile the same code to either JS or Wasm.

About Kotlin, I know they have a working WasmGC toolchain that works very well, so personally I think it is a good option in general. But I don't know offhand about current users or plans.