Top stories

  1. The V8 Sandbox

    Chrome added the V8 Sandbox to its Vulnerability Reward Program, marking a step toward treating the in-process security feature as a stronger boundary. The sandbox is designed to contain memory corruption in V8 so it does not spread within the host process, though issues remain before it can serve as a strong security boundary. Chrome 123 is described as a kind of beta release. The post notes that 60% of Chrome exploits caught in the wild from 2021 to 2023 began with V8 memory-corruption vulnerabilities.

Latest

  1. How we made JSON.stringify more than twice as fast

    V8 has made JavaScript’s JSON.stringify more than twice as fast through a new specialized fast path. It applies when V8 can determine that serializing an object will not trigger side effects, avoiding slower handling for cases such as user-defined code or operations that may cause garbage collection. The change targets a core operation used for tasks including preparing network requests and saving data to localStorage, with faster serialization improving application responsiveness.

  2. Image: V8 Blog

    Speculative Optimizations for WebAssembly using Deopts and Inlining

    V8 shipped two WebAssembly optimizations in Chrome M137: speculative call_indirect inlining and deoptimization support. Together, they use runtime feedback to make assumptions that produce faster machine code, particularly for WasmGC programs. On Dart microbenchmarks, the optimizations delivered an average speedup of more than 50%; gains on larger, more realistic applications and benchmarks ranged from 1% to 8%. Deoptimization also provides a building block for future optimizations.

  3. Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints

    V8’s explicit compile hints help speed JavaScript startup by identifying functions that should be compiled during initial script processing. V8 otherwise chooses whether to compile each function immediately or defer compilation until it is called; deferral can require later work during page loading. Eager compilation can avoid duplicate parsing and run on a background thread while the script is being downloaded, reducing a potential startup bottleneck.

  4. Image: V8 Blog

    Land ahoy: leaving the Sea of Nodes

    V8 is replacing its Sea of Nodes compiler representation with Turboshaft, a more traditional control-flow-graph intermediate representation. The JavaScript backend and the full WebAssembly pipeline now use Turboshaft, while the builtin pipeline is being migrated and the JavaScript frontend is being replaced by Maglev, another control-flow-graph representation. The transition, begun almost three years ago, reflects the project’s move away from Sea of Nodes in its optimizing compiler.

  5. Image: V8 Blog

    Turbocharging V8 with mutable heap numbers

    Google’s V8 team optimized JavaScript performance in JetStream2, achieving a 2.5x improvement in the async-fs benchmark and a noticeable increase in the suite’s overall score. The work began with investigating a performance bottleneck in the benchmark’s custom deterministic implementation of Math.random. V8 says the optimization was inspired by the benchmark, though the coding patterns involved also occur in real-world software.

  6. Introducing the WebAssembly JavaScript Promise Integration API

    JavaScript Promise Integration (JSPI) allows WebAssembly applications written for synchronous external calls to work with asynchronous functionality. It lets such applications pause when an asynchronous operation returns a Promise and resume when that Promise resolves, bridging WebAssembly code with APIs such as fetch. The introduction explains the API’s capabilities, how to access and develop for it, and provides examples to try.

  7. WebAssembly JSPI has a new API

    WebAssembly’s JavaScript Promise Integration API has been revised and is available in Chrome M126. The change removes explicit Suspender objects, using the JavaScript/WebAssembly boundary to determine which computations are suspended. JSPI lets WebAssembly applications built around sequential APIs pause while asynchronous Web APIs resolve a Promise, then resume execution. The update also covers using the API with Emscripten and its roadmap.

  8. WebAssembly JSPI is going to origin trial

    WebAssembly’s JavaScript Promise Integration API entered an origin trial with Chrome M123, allowing developers to test whether it benefits their applications and users. JSPI lets sequential code compiled to WebAssembly access asynchronous Web APIs by suspending execution while a JavaScript Promise is pending and resuming it when the Promise resolves. Developers using Emscripten need version 3.1.47 or later and must register for the trial; the API remains pre-release.

  9. Static Roots: Objects with Compile-Time Constant Addresses

    V8’s static roots feature gives frequently used, read-only JavaScript objects compile-time constant addresses, allowing the engine to identify objects such as undefined through their pointer values. The approach avoids looking up an object’s address and speeds checks such as IsUndefined. It landed in Chrome 111 and brought performance benefits across the virtual machine, particularly for C++ code and builtin functions.