V8 release v9.1

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 9.1, which is in beta …


This content originally appeared on V8 and was authored by Ingvar Stepanyan, testing my private brand

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 9.1, which is in beta until its release in coordination with Chrome 91 Stable in several weeks. V8 v9.1 is filled with all sorts of developer-facing goodies. This post provides a preview of some of the highlights in anticipation of the release.

JavaScript #

FastTemplateCache improvements #

The v8 API exposes a Template interface to the embedders from which new instances can be created.

Creating and configuring new object instances requires several steps which is why it’s often faster to clone existing objects instead. V8 uses a two level cache strategy (small fast array cache and a large slow dictionary cache) to lookup recently created objects based on the templates and clone them directly.

Previously, the cache index for templates was assigned when the templates were created, rather than when they were inserted into the cache. This resulted in the fast array cache being reserved for the templates that were often never instantiated at all. Fixing this resulted in a 4.5% improvement in the Speedometer2-FlightJS benchmark.

Top-level await #

Top-level await is enabled by default in V8 starting with v9.1 and is available without --harmony-top-level-await.

Please note that for the Blink rendering engine, top-level await was already enabled by default in version 89.

Embedders should note that with this enablement, v8::Module::Evaluate always returns a v8::Promise object instead of the completion value. The Promise is resolved with the completion value if module evaluation succeeds and rejected with the error if evaluation fails. If the evaluated module is not asynchronous (i.e. does not contain top-level await) and does not have any asynchronous dependencies, the returned Promise will either be fulfilled or rejected. Otherwise the returned Promise will be pending.

Please see our explainer for more details.

Private brand checks a.k.a. #foo in obj #

The private brands check syntax is enabled by default in v9.1 without requiring --harmony-private-brand-checks. This feature extends the in operator to also work with private fields' #-names, such as in the following example.

class A {
static test(obj) {
console.log(#foo in obj);
}

#foo = 0;
}

A.test(new A()); // true
A.test({}); // false

For a deeper dive, be sure to check out our explainer.

Short builtin calls #

In this release we have temporarily turned unembed builtins (undoing embedded builtins) on 64-bit desktop machines. The performance benefit of unembedding builtins on those machines outweighs the memory costs. This is due to architectural as well as micro-achitectural details.

We'll publish a separate blog post with more details soon.

V8 API #

Please use git log branch-heads/9.0..branch-heads/9.1 include/v8.h to get a list of the API changes.

Developers with an active V8 checkout can use git checkout -b 9.1 -t branch-heads/9.1 to experiment with the new features in V8 v9.1. Alternatively you can subscribe to Chrome’s Beta channel and try the new features out yourself soon.


This content originally appeared on V8 and was authored by Ingvar Stepanyan, testing my private brand


Print Share Comment Cite Upload Translate Updates
APA

Ingvar Stepanyan, testing my private brand | Sciencx (2021-05-04T00:00:00+00:00) V8 release v9.1. Retrieved from https://www.scien.cx/2021/05/04/v8-release-v9-1/

MLA
" » V8 release v9.1." Ingvar Stepanyan, testing my private brand | Sciencx - Tuesday May 4, 2021, https://www.scien.cx/2021/05/04/v8-release-v9-1/
HARVARD
Ingvar Stepanyan, testing my private brand | Sciencx Tuesday May 4, 2021 » V8 release v9.1., viewed ,<https://www.scien.cx/2021/05/04/v8-release-v9-1/>
VANCOUVER
Ingvar Stepanyan, testing my private brand | Sciencx - » V8 release v9.1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/04/v8-release-v9-1/
CHICAGO
" » V8 release v9.1." Ingvar Stepanyan, testing my private brand | Sciencx - Accessed . https://www.scien.cx/2021/05/04/v8-release-v9-1/
IEEE
" » V8 release v9.1." Ingvar Stepanyan, testing my private brand | Sciencx [Online]. Available: https://www.scien.cx/2021/05/04/v8-release-v9-1/. [Accessed: ]
rf:citation
» V8 release v9.1 | Ingvar Stepanyan, testing my private brand | Sciencx | https://www.scien.cx/2021/05/04/v8-release-v9-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.