Learn about optimization techniques using the g++ compiler
Introduction
Compiler basics
Set up Your Environment
Find specific Neoverse features
Try an example application
Next Steps
Learn about optimization techniques using the g++ compiler
Who is this for?
This Learning Path is for beginner C++ developers who are looking to optimize applications on Arm-based cloud instances using compiler flags.
What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Compile a C++ program for a specific Arm target.
- Use compiler flags to manage optimizations.
Prerequisites
Before starting, you'll need the following prerequisites:
- Basic understanding of C++
- Basic understanding of compilers
- Access to a Neoverse-based system running Ubuntu 24.04 LTS, such as an AWS Graviton-based instance or an Arm AGI CPU platform
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 compile and tune a C++ application with
g++ on an Arm Neoverse-based Linux system. You’ll inspect the CPU with lscpu, choose between -march for portability and -mcpu for processor-specific tuning, and consider size-sensitive container builds. You’ll build and run the example, then learn to make flag choices based on portability, binary size, and performance.