Skip to main content

How Google is Making Chrome Faster and Smoother

Google this week announced changes to Chrome that will help the browser run faster and smoother. This is thanks to a change to the way Chrome compiles JavaScript.

Chrome’s V8 JavaScript engine compiles JavaScript in the main thread, which could in turn affect the performance of the JavaScript app, slowing things down or causing stuttering. The latest Chrome Beta hopes to eliminate that by offloading the JavaScript compilation to a background thread.

V8 defers compilation of JavaScript functions until right before they’re executed for the first time. It’s a fast process, but it doesn’t place any focus on optimizing the code. If a piece of code is executed often will get compiled a second time by an optimizing compiler. This compiler employs advanced optimization techniques, which takes more time than the first compilation, but delivers faster code.

Up until now, V8 alternated between compiling optimized JavaScrip code and executing it. This new version of Chrome Beta introduces concurrent compilation, which means compilation and execution happen at the same time, with V8 optimizing large pieces of code in a background thread.  

Concurrent compilation is, right now, only available with Chrome Beta but should hopefully trickle down to the full version of Chrome in the not too distant future and will ultimately contribute towards reducing latency in Chrome.

Follow Jane McEntegart @JaneMcEntegart. Follow us @tomshardware, on Facebook and on Google+.