# [Analyze SIMD utilization with the Instruction Mix recipe](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/3-instruction-mix/)

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/)
- [Set up the target environment and compile the application](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/1-setup/)
- [Identify application bottlenecks with the CPU Microarchitecture recipe](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/2-run-cpu-uarch/)
- [Analyze SIMD utilization with the Instruction Mix recipe](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/3-instruction-mix/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/_next-steps/)

## Run the Instruction Mix recipe
The previous CPU Microarchitecture analysis showed that the sample application used no single instruction, multiple data (SIMD) operations, which points to an optimization opportunity. Run the Instruction Mix recipe to learn more. The Instruction Mix launch panel is similar to CPU Microarchitecture, but it doesn’t include options to choose metrics. Again, enter the full path to the workload.

Select **Dynamic** for the **Analysis Mode**.

![Instruction Mix Configuration](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/instruction-mix-config.webp)  
Instruction Mix Configuration

The results below confirm a high number of integer and floating-point operations at double precision, with no SIMD operations. The **Insights** panel suggests vectorization as a path forward, lists possible root causes, and links to related Learning Paths.

![Instruction Mix Results](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/instruction-mix-results.webp)  
Instruction Mix Results

> **Please Note:**  
> As of Performix 2026.2.2, instruction mix percentages might not total exactly 100%. Totals can be higher or lower depending on category overlap and sampling size or duration. This is expected behavior for the Mandelbrot workload on some systems.
> 
> For example, the image above was run on an Arm AGI CPU, `Double Precision floating point` overlaps with `Floating Point Operations`, which causes double counting. Additionally, depending on the CPU you are running on, you may observe fewer or more labels depending on the instruction groups available.

## Vectorize the application
To address the lack of SIMD operations, you can vectorize the application’s most intensive functions using Neon. For the Mandelbrot application, `Mandelbrot::draw` and its inner `Mandelbrot::getIterations` function consume most of the runtime.

You can build a vectorized version which uses Neon operations and will run on any Neoverse system. Your system might support alternatives such as SVE or SVE2 which can also be used, but only Neon is explained here to make sure you can run it on any Arm Linux system.

Connect to your target machine using SSH and navigate to your project directory.

Build the Neon version:
```
cd $HOME/mandelbrot-example
./build.sh neon
```
The Neon executable is `builds/mandelbrot-neon`

Run the Instruction Mix recipe again with the Neon executable. Integer operations are greatly reduced and replaced by SIMD instructions.

![SIMD Instruction Mix Results](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/instruction-mix-simd-results.webp)  
SIMD Instruction Mix Results

## Assess the performance improvements
Because you are running multiple experiments, give each run a meaningful nickname to keep results organized.

![Rename Run](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/rename-run.webp)  
Rename Run

Use the **Compare** feature at the top right of an entry in the **Runs** view to select another run of the same recipe for comparison.

![Compare Runs](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/compare-with-box.webp)  
Compare Runs

After you select two runs, Arm Performix overlays them so you can review category changes in one view. In the new run, you see Advanced SIMD Operations increase dramatically and Floating Point Operations shrink.

![Instruction Mix Comparison](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/instruction-mix-diff-results.webp)  
Instruction Mix Comparison  
Compared to the baseline, floating-point operations, branch operations, and some integer operations have been traded for loads, stores, and SIMD operations.

Execution time also improves significantly. You can confirm by running each version with the Linux `time` command.

Run the baseline version:
```
time builds/mandelbrot-baseline  4
```
Your output will differ depending on the system you are using, but the output is similar to:
```
__output__Number of Threads = 4
__output__
__output__real	0m1.575s
__output__user	0m5.958s
__output__sys	0m0.018s
```
Run the Neon version:
```
time builds/mandelbrot-neon  4
```
The Neon output shows a significant performance improvement:
```
__output__Number of Threads = 4
__output__
__output__real	0m0.240s
__output__user	0m0.798s
__output__sys	0m0.027s
```

## Compare the CPU Microarchitecture results
The CPU Microarchitecture recipe also supports a **Compare** view that shows percentage-point changes in each stage and instruction type.

![CPU Microarchitecture Difference View](https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture/cpu-uarch-simd-results-diff.webp)  
CPU Microarchitecture Difference View

You can see the relative differences in speculative operation mix between the baseline version and the Neon version. The Insights panel offers additional explanation.

In this section:
- You used the Instruction Mix recipe to confirm a lack of SIMD operations.
- You vectorized the sample application and verified the shift toward SIMD execution.

You’re now ready to analyze and optimize your own native C/C++ applications on Arm Neoverse using Arm Performix. Review the next steps to continue your learning journey.
