Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily

Since the launch of Chrome in 2008, speed has been one of the 4 core principles that shape the work we do to deliver a highly performant browser. The V8 JavaScript compiler is a critical part of delivering maximum speed for the JavaScript that’s shippe…


This content originally appeared on Chromium Blog and was authored by Chromium Blog

Since the launch of Chrome in 2008, speed has been one of the 4 core principles that shape the work we do to deliver a highly performant browser. The V8 JavaScript compiler is a critical part of delivering maximum speed for the JavaScript that’s shipped on practically every web page. In our next post in The Fast and the Curious series, we are excited to share how improvements to the V8 engine are delivering up to 23% faster performance.


An important component of delivering a fast browser is fast JavaScript execution. In Chrome, that job is done by the V8 engine which executes over 78 years worth of JavaScript code on a daily basis. In M91 Chrome is now up to 23% faster with the launch of a new Sparkplug compiler and short builtin calls, saving over 17 years of our users' CPU time each day! Sparkplug is a new JavaScript compiler that fills the gap between needing to start executing quickly and optimizing the code for maximum performance. Short builtin calls optimize where in memory we put generated code to avoid indirect jumps when calling functions.



Sparkplug

The V8 engine has multiple compilers which can make different tradeoffs throughout the various phases of executing JavaScript. Three years ago, we launched a new two-tier compiler system consisting of Ignition and Turbofan. Ignition is a bytecode interpreter whose job is to start executing the JavaScript with as little delay as possible. Turbofan is the optimizing compiler that generates high-performance machine code based on information gathered during JavaScript execution; as a result, it starts up more slowly than Ignition’s bytecode compiler. Sparkplug strikes a balance between Ignition and Turbofan in that it does generate native machine code but does not depend on information gathered while executing the JavaScript code. This lets it start executing quickly while still generating relatively fast code. For a complete technical deep dive into what it took to make this new engine, please see our V8 blog post.






Short builtins

Short builtins is a mechanism by which the V8 engine optimizes the location in memory of generated code. When V8 generates CPU-specific code from JavaScript, it lays that code out in memory. This generated code will frequently call builtin 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. 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 builtin functions into the same memory region as the generated code. This change is especially impactful for the new Apple M1 chip. Please see our V8 blog post to learn more about the impact across platforms of this feature.

Stay turned for many more performance improvements to come!

Posted by Thomas Nattestad, Chrome Product Manager


Data source for all statistics: Speedometer 2.0.


This content originally appeared on Chromium Blog and was authored by Chromium Blog


Print Share Comment Cite Upload Translate Updates
APA

Chromium Blog | Sciencx (2021-05-27T18:04:00+00:00) Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily. Retrieved from https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/

MLA
" » Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily." Chromium Blog | Sciencx - Thursday May 27, 2021, https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/
HARVARD
Chromium Blog | Sciencx Thursday May 27, 2021 » Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily., viewed ,<https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/>
VANCOUVER
Chromium Blog | Sciencx - » Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/
CHICAGO
" » Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily." Chromium Blog | Sciencx - Accessed . https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/
IEEE
" » Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily." Chromium Blog | Sciencx [Online]. Available: https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/. [Accessed: ]
rf:citation
» Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily | Chromium Blog | Sciencx | https://www.scien.cx/2021/05/27/chrome-is-up-to-23-faster-in-m91-and-saves-over-17-years-of-cpu-time-daily/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.