Thursday, September 22, 2005

PDC: Profile Guided Optimizations (POGO)

One of the more interesting technologies that is coming out in the Whidbey time frame actually has nothing to do with the .Net Framework or managed code.

Visual C++ in Visual Studio 2005 has a new Profile Guided Optimizations technology or POGO for short. As a very rough number, there is typically an 8-18% performance improvement with a POGO optimized scenario.

POGO optimization is different from previous optimizations in Visual C++ in that data from test runs is collected and used to make smarter choices on how to optimize the code. For example, runtime data can be used to understand what code paths are expected and which are exceptional and the final link can optimize the code for the expected code paths.

When creating a POGO optimized image, data test runs are used to apply additional optimizations such as intelligent inlining, virtual call speculation, register allocation and code locality. A full list of the optimizations with explanations is available here and there is a POGO walkthrough here.

Because I am mainly a managed code developer, one of the ways I imagine using POGO is to optimize sections of code that require a high level of performance and are therefore written in unmanaged C++ and invoked from my managed code via interoperability.

Additionally, I have a number of applications that are written in unmanaged code that can benefit from this technology.

Finally, from what I understand MS Office and Windows NT both use this technology to improve the performance of their software. The implications are that POGO is both reliable and compatible.


Post a Comment

<< Home