V8 version 7.4 beta is out: WebAssembly Threads/Atomics, faster calls with arguments mismatch & more
In case you are not familiar with V8, let’s have a short introduction.
Today, we are taking a look at V8’s latest release, version 7.4, and all the improvements and new features it brings to the table.
You should keep in mind, however, that this release will remain in beta until Chrome 74 Stable comes out in a few weeks.
The new features
WebAssembly Threads/Atomics shipped – Enabled on non-Android operating systems. This concludes the origin trial/preview that was enabled in V8 v7.0. This unlocks the usage of multiple cores on a user’s machine via WebAssembly, enabling new, computation-heavy use cases on the web.
Faster calls with arguments mismatch – There are scenarios where the engine knows that arguments’ adaption is not necessary since the actual parameters cannot be observed, namely when the callee is a strict mode function, and uses neither
arguments nor rest parameters. In these cases, V8 now completely skips arguments adaption, reducing call overhead by up to 60%.
Improved native accessor performance – Improved performance of calling into native accessors, making it significantly faster than the megamorphic property access.
Bytecode dead basic block elimination – Allows entire basic blocks to become dead, if no
Jump bytecode (Ignition’s main control flow primitive) refers to them. Although this change is not expected to have a large impact on user code, it is particularly useful for simplifying various desugarings, such as generators,
try-catch, and in particular removes a class of bugs where basic blocks could “resurrect” complex statements part-way through their implementation.
Private class fields – Added support for the public class fields syntax. Class fields simplify class syntax by avoiding the need for constructor functions just to define instance properties. Starting in V8 v7.4, you can mark a field as private by prepending it with a
Intl.Locale– Offers a more powerful mechanism to deal with locales, and enables easily extracting locale-specific preferences such as the language, the calendar, the numbering system, the hour cycle, and so on.
Check out the official release notes for the detailed information on all the new features.