Google’s JavaScript and WebAssembly engine, V8 has hit V8 7.2 yesterday and is currently in beta. The stable version of this release will be out in coordination with Chrome 72 Stable. V8 7.2 comes with support for embedded builtins, public class fields, well-formed JSON.stringify, and more.
Following are some of the updates introduced in this version:
Support for embedded builtins
Embedded builtins are now supported and enabled by default on the ia32 architecture. The main aim of embedded builtins is to eliminate the per-Isolate builtin overhead by making builtins truly isolate-independent.
JavaScript parsing
As compared to V8 7.0 the parsing speed has improved by roughly 30% in this version. While loading the web pages 9.5% of the V8 time is spent at startup on parsing JavaScript. This parsing is drastically reduced from 9.5% to 7.5% resulting in faster load times and more responsive pages.
WebAssembly improvements
Code generation is improved in the top execution tier. This version comes enabled node splitting in the optimizing compiler’s scheduler and loop rotation in the backend. Also, this version introduces custom wrappers that reduce overhead in calling imported JavaScript math functions and comes with improved wrapper caching.
Async stack traces
A new feature called zero-cost async stack traces is introduced, which improves the error.stack property with asynchronous call frames. This feature aims to solve the problem developers were facing that the error.stack property in V8 only provides a truncated stack trace up to the most recent await. It is currently available behind the –async-stack-traces command-line flag.
Public class fields
This version supports public class fields and support for private class fields is planned for a future V8 release.
Well-formed JSON.stringify
The well-formed JSON.stringify proposal is implemented in V8 7.2. Previously, JSON.stringify used to return ill-formed Unicode strings if the input had any lone surrogates. To solve this, well-formed JSON.stringify outputs escape sequences for lone surrogates, making its output valid Unicode and representable in UTF-8.
You can read the full list of updates on V8’s official website.
Read Next
Google’s V8 7.2 and Chrome 72 gets public class fields syntax; private class fields to come soon