Optimize Windows on Arm C++ apps with profile-guided optimization
Introduction
Understand Profile-Guided Optimization
Understand Google Benchmark basics
Create a baseline benchmark
Apply Profile-Guided Optimization
Next Steps
Optimize Windows on Arm C++ apps with profile-guided optimization
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?
After completing this Learning Path, you'll be able to perform the following tasks:
- 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'll need the following prerequisites:
- 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
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.
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.