Google has rolled out Chrome v91 recently that contained a lot of features. Some include the default desktop mode, a better File System Access API, and a new control panel. While these are appreciated, an actual advantage comes in the form of performance improvement. As per Google, the latest Chrome is now 23% faster than its predecessor due to Sparkplug compiler tools and short built-in calls.
Google Chrome Performance Improvements
Google has long been blamed for logging resources and slow performance, offering the best browsing features. In its new version 91 rolled out recently, Google has solved, at least bettered the performance of its Chrome browser to be more appealing to the users.
As per the Chromium blog post, Google Chromeโs Product Manager, Thomas Nattestad, said that the new Chrome is upto 23% faster than its previous version, saving the users 17 years of their โCPU time each day.โ And this is made possible by two new tools โ Sparkplug compiler and Short Builtin calls.
As explained by Nattestad, the Sparkplug compiler is tasked to fill the โgap between needing to start executing quickly and optimizing the code for maximum performance.โ Whereas the โShort builtin calls, will optimize where in memory we put generated code to avoid indirect jumps when calling functions.โ
Explaining more, the Chrome browserโs JavaScript V8 engine has multiple compilers that generate and share data among them in various phases of execution. The Sparkplug compiler bridges the gap between Ignition and Turbofan โ V8 engineโs two-tier compiler system to โgenerate native machine code without depending on the information gathered while executing the JavaScript code.โ
This results in faster performance since the execution is down quicker. And the Short builtins is a new mechanism that helps the V8 engine optimize the location in memory of generated code. As Nattestad wrote, โWhen V8 generates CPU-specific code from JavaScript, it lays that code out in memory. This generated code will frequently call built-in functions, which are small snippets of code for handling common routines โeverything from basic operations like adding two variables to full-fledged functions in the JavaScript standard library.โ
Further, โFor some CPUs, calling functions that are further away from your generated code can cause CPU-internal optimizations (such as branch prediction logic) to fail. The fix for this is to copy the built-in functions into the same memory region as the generated code.โ