What’s new in Google's V8 JavaScript engine

WebAssembly gets a boost with streaming compilation in the upcoming branch

Credit: Deavmi

A newly created branch of Google’s V8 JavaScript engine promises to improve compilation of the WebAssembly portable code format via streaming compilation in V8’s WebAssembly API. V8’s Version 6.5 branch is now in beta but expected in the Chrome 65 Stable browser release in a few weeks.

V8 is a staple in both the Chrome browser and the Node.js JavaScript runtime. WebAsembly is also supported in Mozilla Firefox, Apple Safari, and Microsoft Edge, though those browsers do not use V8.

New features in V8 Version 6.5

In V8 Version 6.5’s streaming compliation, WebAssembly modules are compiled while module bytes are still being downloaded. When all bytes of a single function have been downloaded, the function is passed to a background thread for compilation. As a result, WebAssembly compilation in Chrome 65 can maintain a 50Mbps download speed on high-end machines, Google says—meaning that if WebAssembly is downloaded at that speed, compilation finishes as soon as the download is done.

 Other improvements planned for the 6.5 branch include:

  • An untrusted code mode, developed in response to a specualative side-channel Spectre attack. This mode is suitable for applications processing user-generated, untrusted code and is enabled by default.
  • A mechanism to detect and prevent a deoptimization loop. This loop occurs when optimized code deoptimizes and there is no way to find out what went wrong. V8 developers also have inlined many JavaScript builtins that had been excluded because of a side effect between the load of a function to call and the call itself.

Where to download the V8 Version 6.5 branch

You can download the V8 Version 6.5 branch from Google’s Git repo.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about AppleGoogleMicrosoftMozilla

Show Comments