Every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s Git master immediately before a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 5.7, which will be in beta until it is released in coordination with Chrome 57 Stable in several weeks. V8 5.7 is filled with all sorts of developer-facing goodies. We’d like to give you a preview of some of the highlights in anticipation of the release.
Performance improvements #
Native async functions as fast as promises #
Async functions are now approximately as fast as the same code written with promises. The execution performance of async functions quadrupled according to our microbenchmarks. During the same period, overall promise performance also doubled.
Continued ES2015 improvements #
V8 continues to make ES2015 language features faster so that developers use new features without incurring performance costs. The spread operator, destructuring and generators are now approximately as fast as their naive ES5 equivalents.
RegExp 15% faster #
Several recent additions to the ECMAScript standard library are included in this release. Two String methods,
padEnd, provide helpful string formatting features, while
Intl.DateTimeFormat.prototype.formatToParts gives authors the ability to customize their date/time formatting in a locale-aware manner.
WebAssembly enabled #
Chrome 57 (which includes V8 v5.7) will be the first release to enable WebAssembly by default. For more details, see the getting started documents on webassembly.org and the API documentation on MDN.
V8 API additions #
Please check out our summary of API changes. This document is regularly updated a few weeks after each major release. Developers with an active V8 checkout can use
git checkout -b 5.7 -t branch-heads/5.7 to experiment with the new features in V8 v5.7. Alternatively you can subscribe to Chrome's Beta channel and try the new features out yourself soon.
This C++ API allows users to implement profiling code that traces through the lifecycle of promises. This enables Node’s upcoming AsyncHook API which lets you build async context propagation.
PromiseHook API provides four lifecycle hooks: init, resolve, before, and after. The init hook is run when a new promise is created; the resolve hook is run when a promise is resolved; the pre & post hooks are run right before and after a
PromiseReactionJob. For more information please check out the tracking issue and design document.