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
Review frequently asked questions
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.
Run
lscpu | grep -i model and look for a Model name line such as Neoverse-*. If lscpu omits the model name, use the tip in the step to read the CPU part number.Use
-march= with a value that matches the lowest Arm architecture across your target systems for portability. Use -mcpu= to tune for a specific processor when you plan to run only on that CPU.No. Any Neoverse-based system running Ubuntu 24.04 LTS works, including the examples mentioned. The workflow assumes an Arm-native environment on such a system.
Optimize for size as outlined in the example step. Choose compiler options that reduce binary size and accept the trade-offs they introduce.
The program should compile and run on the Arm instance. A portable build using
-march is intended to run on other Arm servers that meet that baseline, while a CPU-tuned build targets the specified processor.