BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Releases Versions 7.2 and 7.3 of V8 JavaScript Engine

Google Releases Versions 7.2 and 7.3 of V8 JavaScript Engine

This item in japanese

Bookmarks

The recent 7.2 and 7.3 versions of Google's V8 JavaScript engine improve JavaScript parsing performance, new JavaScript language features, and WebAssembly performance.

Significant performance attention has turned to JavaScript parsing time recently with the introduction of the binary-ast proposal.

Per the V8 7.2 release announcement, typical web pages spend around 10% of their V8 time parsing JavaScript resources at startup. Between versions 7.0 and 7.2, the V8 desktop parsing performance has improved by approximately 30%, resulting in a typical JavaScript parsing time of around 7.5%.

Recently announced improvements to optimize async functions and promises have arrived in the V8 7.2 release. The V8 7.3 version enables async stack traces to improve developer experience when debugging asynchronous code.

The 7.2 release also improves the performance of spread elements when they are the first item of an array literal, e.g. [...foo, 42, 75]. As explained by the V8 team:

The improvement benefits several use cases including spreading arrays, primitive strings, sets, map keys, map values, and — by extension — to Array.from(x).

V8 7.2 also adds support for several JavaScript language proposals. The TC39 Stage 3 proposal for public class fields is now supported, with private class fields planned for a future V8 release. Intl.ListFormat support allows for localized list formatting. And the Stage 1 proposal for module namespace exports, export * as utils from './utils.mjs';, is also part of this release.

The 7.3 release adds support for Object.fromEntries, a Stage 4 proposal that is part of the ES2019 specification. The release also includes support for the Stage 3 String.prototype.matchAll proposal, making it easier to iterate through regular expression matches with capture groups.

WebAssembly also received attention with these V8 releases. As explained by the V8 team, Version 7.2 receives many improvements:

We analyzed a number of WebAssembly benchmarks and used them to guide improved code generation in the top execution tier. In particular, V8 v7.2 enables node splitting in the optimizing compiler’s scheduler and loop rotation in the backend. We also improved wrapper caching and introduced custom wrappers that reduce overhead in calling imported JavaScript math functions. Additionally, we designed changes to the register allocator that improve performance for many code patterns that will land in a later version.

In version 7.3, WebAssembly compilation time gets reduced by 15–25% without regressing the quality of generated code.

Significant work is underway to improve WebAssembly throughput code with trap handlers. Support has landed for Windows, macOS, and Linux in V8 v7.2.

Google creates branch releases of its V8 JavaScript engine every six weeks to coincide with Google Chrome releases. Version 7.2 of V8 ships with Chrome 72 and 7.3 with Chrome 73. V8 also powers the Node.js JavaScript runtime.

V8 is open source software with several applicable licenses to subsets of the codebase due to external dependencies. Contributions are welcome via the V8 Git project and should follow V8's contribution guidelines and Google's open source conduct guidelines.

Rate this Article

Adoption
Style

BT