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 8.9, which is in beta until its release in coordination with Chrome 89 Stable in several weeks. V8 v8.9 is filled with all sorts of developer-facing goodies. This post provides a preview of some of the highlights in anticipation of the release.
In standalone V8, top-level
await remains behind the
Please see our explainer for more details.
Faster calls with arguments size mismatch #
In the under-application case, the remaining parameters get assigned to the
undefined value. In the over-application case, the remaining arguments can be either accessed by using the rest parameter and the
Function.prototype.arguments property, or they are simply superfluous and ignored. Many web and Node.js frameworks nowadays use this JS feature to accept optional parameters and create a more flexible API.
Until recently, V8 had a special machinery to deal with arguments size mismatch: the arguments adaptor frame. Unfortunately, argument adaption comes at a performance cost and is commonly needed in modern front-end and middleware frameworks. It turns out that with a clever design (like reversing the order of the arguments in the stack), we can remove this extra frame, simplify the V8 codebase, and get rid of the overhead almost entirely.
The graph shows that there is no overhead anymore when running on JIT-less mode (Ignition) with a 11.2% performance improvement. When using TurboFan, we get up to 40% speedup. The overhead compared to the no mismatch case is due to a small optimization in the function epilogue. For more details, see the design document.
If you want to learn more about the details behind those improvements, check out the dedicated blog post.
V8 API #
git log branch-heads/8.8..branch-heads/8.9 include/v8.h to get a list of the API changes.
Developers with an active V8 checkout can use
git checkout -b 8.9 -t branch-heads/8.9 to experiment with the new features in V8 v8.9. Alternatively you can subscribe to Chrome’s Beta channel and try the new features out yourself soon.