JavaScript engine V8 9.0.0 communicates faster with WebAssembly

[ad_1]

A new release is available for Google’s JavaScript engine V8 with 9.0. The ninth major version marks the beginning of a new branch. Until the next Chrome release is stable under version number 90, the current V8 version will keep beta status.

V8 9 introduces a match index for regular expressions (RegExp). Developers have the option of calling up an array with the start and end positions of the corresponding capture group in a match with RegExp. The array is via the property .indices available for match objects if the regular expression has the flag /d Has.

What is also new is that you can use the keyword super can now be used to access properties and functions of the parent object. Until now, access to a super property (e.g. super.x) implemented via a runtime call. With V8 9.0, the inline cache system (IC) is used in non-optimized code, which generates the corresponding optimized code for access to the super property without having to resort to the runtime. This apparently increases the speed for accessing properties.

In the past, there was a performance penalty when calling JavaScript for WebAssembly because V8 uses different display formats for the parameters of WebAssembly and JavaScript functions. When an exported WebAssembly function is called by JavaScript, the call runs through a so-called JS-to-Wasm wrapper, which ensures that the parameters are adjusted from JavaScript to WebAssembly – also in the opposite direction. With the update, the JS-to-Wasm wrapper now has the option of being embedded (inlined) at the point of call, which is intended to simplify the code and remove this additional frame. It’s an experimental feature, what about the flag --turbo-inline-js-wasm-calls can be deactivated.

Due to a recently discovered grammatical ambiguity becomes the token sequence for for (async of from now on no longer parsed. More information about the new version of the JavaScript engine can be found in the post on the V8 blog.


(mdo)

To home page

[ad_2]

Leave a Reply