قالب وردپرس درنا توس
Home / Tips and Tricks / A new JavaScript compiler aims to improve Chrome’s overall speed – Review Geek

A new JavaScript compiler aims to improve Chrome’s overall speed – Review Geek



Google Chrome application icon on Apple iPhone X screen close-up
BigTunaOnline / Shutterstock.com

Google has now rolled out a new JavaScript compiler called Sparkplug for its V8 JavaScript engine in Chrome. Sparkplug̵

7;s engineers ensure that it will create a faster web experience, and that this is done by “cheating”.

The new compiler is part of the Chrome 91 update, which Google rolled out on Tuesday. In addition to Sparkplug, the release also includes security updates and other critical changes that will boost the JavaScript engine.

Thomas Nattestad, a Chrome product manager, said, “An important part of providing a fast browser is the fast execution of JavaScript. In Chrome, that job is done by the V8 engine that runs over 78 years of JavaScript code every day. In M91, Chrome is now up to 23% faster with the launch of a new Sparkplug compiler and short built-in callssaving more than 17 years of CPU time for our users every day. “

The compiler is a welcome addition to the JavaScript pipeline as it acts as an intermediary between the existing Ignition and Turbofan compilers. Ignition interprets the bytecode and Turbofan optimizes the powerful machine code. Both are doing well, but it takes time to process and optimize all of the code.

JavaScript programming language with script code on laptop screen
fatmawati achmad zaenuri / Shutterstock.com

As Nattestad explains, “Sparkplug balances Ignition and Turbo Fan by generating native machine code, but not relying on the information collected while executing the JavaScript code. This allows it to run quickly while still generating relatively fast code. “

And Sparkplug “cheats” its way to efficiency by compiling functions already compiled to bytecode. Leszek Swirski, one of Sparkplug’s engineers, explains that “the bytecode compiler has already done most of the hard work, such as variable resolution, figuring out whether parentheses are in fact arrow functions, evading destructuring statements, and so on. Sparkplug compiles from bytecode instead of JavaScript source, so you don’t have to worry about that. “

However, explaining the intricacies can get super technical, super fast. If you like that, you can read the entire V8 Devs blog post here. For the rest of us, you just need to know that Chrome is now going to speed up a bit, which is great news for everyone.

through ZDNet

fbq('init', '1137093656460433'); fbq('track', 'PageView'); },3000);


Source link