Google Speeds Up Chrome by Compiling JavaScript in the Background

Instead of doing this in parallel, Chrome found a way to speed things up a bit

The latest Chrome beta is out already and it comes with one big change that should further boost the browser’s performance.

“In the latest Chrome Beta we've enabled concurrent compilation, which offloads a large part of the optimizing compilation phase to a background thread. The result is that JavaScript applications remain responsive and performance gets a boost,” reads a blog post signed by Google engineer Yang Guo.

The post goes on to explain how V8, Chrome’s JavaScript engine, defers compilation of functions until immediately before they are executed. “This compilation phase is fast but doesn’t focus on optimizing the code, just on getting it done quickly. In V8, pieces of code that are executed very often are compiled a second time by a specialized optimizing compiler,” Guo explains.

While the second pass takes a bit longer because it uses many advanced optimization techniques, it ultimately delivers much faster code.

Now, the two compilation sequences are done concurrently, which saves a lot of time and avoids stuttering and dropping frames in complex apps, such as games.

Since this is just the beta version of Chrome, users can expect more improvements by the time the changes hit the stable version.

Hot right now  ·  Latest news