Who is this for?

This is an introductory topic for software developers who want to optimize C++ application performance on Windows on Arm using profile-guided optimization (PGO).

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Microbenchmark a function using Google Benchmark
  • Apply profile-guided optimization to build performance-tuned binaries for Windows on Arm
  • Measure and compare performance improvements from PGO-optimized builds

Prerequisites

Before starting, you will need the following:

  • Familiarity with C++ development and compiling programs from the command line
  • A Windows on Arm machine with Visual Studio and the C++ desktop development tools installed

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll measure the impact of profile-guided optimization (PGO) on C++ code for Windows on Arm using MSVC and Google Benchmark. First, you’ll create a division microbenchmark and record a baseline, then build and run an instrumented binary to collect profiles. You’ll rebuild with those profiles, rerun the benchmark, and compare results to identify gains in hot paths.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
Which command prompt should I use to run the build steps on Windows on Arm?
Open ARM64 Native Tools Command Prompt. Start PowerShell from there if needed, then navigate to your project directory before running build and benchmark steps.
What result should I capture from the baseline run?
Record the benchmark measurements for the division routine. You’ll compare the same benchmark after rebuilding with PGO.
How do I compare baseline and PGO results?
Run the same division benchmark before and after rebuilding with the collected profile data. Keep the benchmark setup consistent, then compare the reported measurements to evaluate the impact of PGO.
How do I know that profile data was collected and applied?
Build an instrumented binary, run it to generate the execution profile, then rebuild using that profile. If you skip the run, the optimized build won’t use profile information, and your comparison won’t reflect PGO.
Why do the Learning Path benchmark integer division?
Division has higher latency and lower throughput than simple arithmetic on most CPU architectures, including Arm. The operation provides a clear baseline to observe the effect of PGO on a costlier operation.
Next