days
-6
-2
hours
-1
-3
minutes
-1
-8
seconds
-5
-3
search
Plus significant performance improvements

V8 version 7.4 beta is out: WebAssembly Threads/Atomics, faster calls with arguments mismatch & more

Eirini-Eleni Papadopoulou
JavaScript
© Shutterstock / Teguh Jati Prasetyo  

V8, an open source JavaScript engine created by Google is here with a new version that’s currently in beta. V8 version 7.4 brings some major performance improvements and some interesting new features.

In case you are not familiar with V8, let’s have a short introduction.

V8 is an open source JavaScript engine created by Google and written in C++. It allows for WebAssembly to run fast and meet high-performance goals. Ahead of time, code is compiled in V8, so high-performance goals can be reached.

“V8 implements ECMAScript as specified in ECMA-262, 5th edition, and runs on Windows (XP or newer), Mac OS X (10.5 or newer), and Linux systems that use IA-32, x64, or ARM processors. V8 compiles and executes JavaScript source code, handles memory allocation for objects, and garbage collects objects it no longer needs. V8’s stop-the-world, generational, accurate garbage collector is one of the keys to V8’s performance.”

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

JIT-less V8 – Now supports JavaScript execution without allocating executable memory at runtime.

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.

SEE ALSO: Liftoff: Speedy new compiler for the V8 JavaScript engine

Bytecode flushing – The V8 team’s experiments with bytecode flushing show that it provides significant memory savings for users of Chrome, reducing the amount of memory in V8’s heap by between 5–15% while not regressing performance or significantly increasing the amount of CPU time spent compiling JavaScript code.

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, for-of and 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 # prefix.

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.

Author
Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou is the editor for JAXenter.com. Coming from an academic background in East Asian Studies, she decided that it was time to go back to her high-school hobby that was computer science and she dived into the development world. Other hobbies include esports and League of Legends, although she never managed to escape elo hell (yet), and she is a guest writer/analyst for competitive LoL at TGH.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of