Chrome starts using Microsoft’s Profile Guided Optimization (PGO)

Nov 2, 2016

Recently, Google announced that it was working on a project to make Chrome, its browser a lot faster and reliable on Windows. To realize this objective, the company was testing a feature called Profile-Guided Optimization or PGO, available from Microsoft’s compiler on Windows.

Chrome will be faster

Profile Guided optimization (PGO) works by compiling a special version of Chrome that tracks which features or characteristics of the browser are used the most. After analyzing this data, it optimizes the most used functions for speed. As a result, Chrome’s overall performance is improved and its speed is enhanced by manifolds.

Chrome is a huge software project with more than a million functions in its source code. Not all functions are equal – some are called frequently, while others are rarely used. PGO uses data from runtime execution that track which functions are most common to guide optimization.

To gather this data, the nightly build process now produces a special version of Chrome that tracks how often functions are used. PGO then optimizes those high-use functions for speed, in some cases increasing the binary size of those functions. To balance out that increase, PGO also optimizes less-used functions with smaller, though slightly slower code. These trade-offs result in higher overall performance, and a smaller overall code footprint.

It is believed with this new optimization, Chrome on Windows will load up to 15% faster. How? PGO optimizes the memory location of the code by moving less used functions away from frequently-used ones in memory. This results in more optimal use of the CPU instruction cache by avoiding caching of less-used code, thereby enhancing overall performance.

The move from Google seems to be a measured response to claims made by Microsoft few days earlier that Edge is faster than Google’s popular browser. Earlier, PGO technology was available for 64-bit Windows systems. Now with Chrome, this technology will be available to everyone.

This is already available in the 64-bit version of the browser since Chrome 53. The 32-bit version got this feature in Chrome 54.