Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily
2021-05-28 03:04:00 Author: www.blogger.com(查看原文) 阅读量:142 收藏

tag:blogger.com,1999:blog-2471378914199150966.post-86293567256509648602021-05-27T11:04:00.004-07:002021-05-27T11:42:38.062-07:00Chrome is up to 23% faster in M91 and saves over 17 years of CPU time daily<i>Since the launch of Chrome in 2008, speed has been one of <a href="https://www.chromium.org/developers/core-principles">the 4 core principles</a> 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 <a href="https://blog.chromium.org/search/label/the%20fast%20and%20the%20curious">The Fast and the Curious</a> series, we are excited to share how improvements to the V8 engine are delivering up to 23% faster performance.</i><div><br /></div><div><br />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 <a href="https://v8.dev/blog/sparkplug">new Sparkplug compiler</a> and <a href="https://v8.dev/blog/short-builtin-calls">short builtin calls</a>, 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.<br /><br /><br /><br /><h2 style="text-align: left;">Sparkplug</h2>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 <a href="https://v8.dev/blog/launching-ignition-and-turbofan">Ignition and Turbofan</a>. 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 <a href="https://v8.dev/blog/sparkplug">V8 blog post</a>.<div><br /></div><div><br /></div><div><br /><div class="separator" style="clear: both; text-align: center;"><img alt="" data-original-height="60" data-original-width="600" height="40" src="https://lh3.googleusercontent.com/-Ono_G8y2Jgw/YK_ZfNVDgYI/AAAAAAAABis/3DAdQjLxlmc5wnnoJdCR8FElSYSvSierwCLcBGAsYHQ/w400-h40/image.png" width="400" /></div><br /><br /><br /><h2 style="text-align: left;">Short builtins </h2>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 <a href="https://v8.dev/blog/short-builtin-calls">our V8 blog post</a> to learn more about the impact across platforms of this feature.<div><br /></div><div>Stay turned for many more performance improvements to come!</div><div><br /></div><div>Posted by Thomas Nattestad, Chrome Product Manager<br /><br /><br /><i>Data source for all statistics: <a href="https://browserbench.org/Speedometer2.0/">Speedometer 2.0</a>.</i><br /></div></div></div>Chromium Bloghttps://www.blogger.com/profile/06394244468194711527[email protected]

文章来源: http://www.blogger.com/feeds/2471378914199150966/posts/default/8629356725650964860
如有侵权请联系:admin#unsafe.sh