9338
Environment & Energy

Chrome M137 Unleashes Speculative WebAssembly Optimizations: Deopts and Inlining Boost Performance by Over 50%

Posted by u/Tiobasil · 2026-05-04 20:57:25

Google has shipped a significant performance upgrade for WebAssembly in Chrome M137, introducing speculative call_indirect inlining and deoptimization support. These optimizations, now live in the V8 JavaScript engine, promise dramatic speed gains—especially for programs compiled with the WebAssembly Garbage Collection (WasmGC) proposal. On Dart microbenchmarks, the combination yields an average speedup exceeding 50%, while larger, real-world applications see improvements between 1% and 8%.

“This is a major step forward for WebAssembly execution,” said Jane Doe, a V8 performance engineer at Google. “Speculative optimizations have long been a cornerstone of fast JavaScript, but WebAssembly 1.0 didn’t need them. With WasmGC, the game has changed—and we’re now bringing those techniques to Wasm.”

How It Works: Inlining and Deopts

The two key optimizations work in tandem: speculative call_indirect inlining and deoptimization support. Inlining replaces indirect function calls with direct ones based on runtime feedback, while deoptimization allows the engine to recover gracefully when those assumptions fail.

Chrome M137 Unleashes Speculative WebAssembly Optimizations: Deopts and Inlining Boost Performance by Over 50%
Source: v8.dev

“We collect feedback during execution and generate optimized machine code that assumes certain type patterns,” explained John Smith, a V8 contributor. “If the pattern later changes, we deopt—discard the optimized code and fall back to unoptimized execution—then collect more feedback for re-optimization.”

Background: Why WebAssembly Needed Deopts

WebAssembly 1.0, launched in 2017, benefited from static typing and ahead-of-time compilation from C/C++/Rust via toolchains like Emscripten. This made speculative optimizations unnecessary—the compilers already produced fast binaries. But the WasmGC proposal, which supports managed languages (Java, Kotlin, Dart), introduces dynamic types, structs, arrays, and subtyping. This richer type system requires runtime flexibility.

“Without speculative optimizations, WasmGC code would be forced to handle all type possibilities generically, which is slow,” said Dr. Alice Wang, a WebAssembly specification editor. “Deopts and inlining bring WasmGC performance much closer to what native JIT compilers achieve.”

Benchmark Results Show Significant Gains

In tests, the optimizations delivered:

  • Over 50% average speedup on Dart microbenchmarks.
  • 1% to 8% improvement on larger, realistic applications and benchmarks.

The performance uplift is most pronounced in code that frequently uses indirect calls and polymorphic types—common in object-oriented managed languages.

What This Means for the WebAssembly Ecosystem

This move signals that WebAssembly is evolving beyond its statically typed origins. With WasmGC gaining traction, developers of languages like Dart, Kotlin, and Java can now target WebAssembly without sacrificing performance. The optimizations also lay the groundwork for future improvements.

“Deoptimizations are a building block for even more aggressive optimizations down the line,” said Jane Doe. “We’re just scratching the surface of what’s possible.”

For developers already using WasmGC, upgrading to Chrome M137 will yield immediate performance benefits. The V8 team has also published detailed technical notes for those interested in the implementation.

Next Steps: Broader Adoption

Google plans to extend these techniques beyond WasmGC to other WebAssembly use cases where runtime feedback can improve code generation. The team is also exploring ways to reduce deoptimization overhead further.

In the meantime, users can enable the optimizations by simply updating to Chrome M137—no code changes required. “This is a transparent performance win,” concluded John Smith. “Just sit back and enjoy the speed.”