4 ms·
> Chrome's Wasm team has compiled versions of the Fannkuch benchmark (which allocates data structures as it works) from C, Rust, and Java. The C and Rust binari
by AlexErrant 3y ago
> Chrome's Wasm team has compiled versions of the Fannkuch benchmark (which allocates data structures as it works) from C, Rust, and Java. The C and Rust binaries could be anywhere from 6.1 K to 9.6 K depending on the various compiler flags, while the Java version is much smaller at only 2.3 K! C and Rust do not include a garbage collector, but they do still bundle malloc/free to manage memory, and the reason Java is smaller here is because it doesn't need to bundle any memory management code at all.
https://developer.chrome.com/blog/wasmgc/ https://developer.chrome.com/blog/wasmgc/
For Blazor, it'll only help with the GC - IIRC Blazor has to ship the entire dotnet runtime.
- DylanSp 3y agoI saw that, and it's impressive about Java; I thought it would require a similarly large runtime to .NET. From the blog post, it sounds like they're not shipping a JVM, I guess they're just shipping as little of the JRE as they can get away with? (I'm guessing due to my unfamiliarity with the Java world)
- azakai 3y ago.NET's runtime gives it capabilities like finalizers, JITing, debugging, etc. - it's very comprehensive. J2Wasm (Java on WasmGC) is making do without those for now, and just shipping minimal support for a large/useful subset of the language.
- DylanSp 3y agoGotcha, that makes a lot of sense.