V8 introduces two new WebAssembly optimizations in Chrome M137: speculative call_indirect inlining and deoptimization support. These optimizations use runtime feedback to make assumptions and generate faster machine code, particularly benefiting WasmGC programs. The combination delivers 50%+ speedups on Dart microbenchmarks and 1-8% improvements on realistic applications. Speculative inlining replaces indirect calls with inlined function bodies when feedback shows monomorphic or polymorphic call patterns, while deoptimization allows graceful fallback to baseline code when assumptions prove incorrect, enabling more aggressive optimizations.

20m read timeFrom v8.dev
Post cover image
Table of contents
Background #Motivation #Speculative Inlining #Deoptimization #Results #Conclusion and Outlook #

Sort: