Google wants to make calculations twice as fast in Sheets – but a quick spreadsheet requires Chrome or Microsoft Edge to get started. Firefox and Apple Safari will also follow as supported web browsers in the future.
Advertisement
Under the hood, WebAssembly Garbage Collection (WasmGC), which allows Google to return to Java with Sheets, is responsible for the doubled computation speed. Microsoft Edge is based on Chromium – Google does not comment on other web browsers based on it in the announcement.
Java to JavaScript and back
The engine responsible for the calculations was originally based on Java. This implementation dates back to 2006 and was designed to upload all calculations to Google servers. However, since 2013, Google has switched to local calculations in the browser using JavaScript. To ensure that both versions calculate exactly the same results, the developers added a validation mechanism to Sheets.
The same verification mechanism also compared calculation speeds – with the grim result that the Java Script version of the engine is more than three times slower than the older Java implementation. This is especially evident with large tables, as can be seen from Google’s blog post.

Triune Optimization
So Google has been working since 2020 on returning to Java via WebAssembly (Wasm), a browser platform that runs other programming languages ​​like C or Rust, which Wasm then converts to JavaScript. To use Java efficiently, a garbage collector is needed, which Google is now putting to productive use with WasmGC.
During development, programmers wrote a special compiler for Wasm to replace Sheet’s old JavaScript libraries. In addition, it took a lot of time to validate mathematical calculations. The first prototype was ready in early 2022.
However, at launch it was twice as slow as the JavaScript version. Developers then adopted optimizations from the Java Virtual Machine (JVM) and V8, relied on more optimized browser APIs, and removed JavaScript-specific code patterns. Then you got to the current, more performant state that users are now enjoying.
Announcement and detailed Contribution to development Can be found on Google’s blog.
(For)
