Run an optimization
This section shows how to run an optimization after running an analysis on your project.
Optimization strategy setup

On the analysis dashboard, click on Optimize.

On the optimization strategy page, you can see the details of all optimizations that were found on your code, and generate code for the ones that are automatically optimizable.

In the file tree, you may enter the files and functions where optimizations were found. For that, click on See details.

There, you can see the optimizations that were found, where they have impact on the code, what parts of the code are concerned by the optimizations and how they work. Go back to the optimization strategy by clicking on the top left arrow.

On the main page, clicking on Optimization kinds selection on the project root, any directory, file or function allows to activate or not optimizations on that level. Click on it on the project root.

There, activate all available automatic optimizations, and click on Confirm.
Optimization preview

Click on the play button to start an optimization score preview. This way, you can have a quick estimation of the gains given the optimization which were activated in your strategy.

After a few seconds, we can see that automated optimizations could bring an estimated 9.2% performance improvement in the FFT-C code.
Run the optimization
Click on Run optimization to actually generate modified source code implementing the selected optimizations.

At that point, you can click on Download code to get the optimized code.
Optimized code analysis
To go further, you can run a new analysis on the optimized code to aknowledge better the impact of the newly generated code.
To do that, click on Run analysis. After that, you can see the same metrics as for the initial analysis, but for the optimized code, to see the actual effects of the optimizations.

For instance, you can see that now, the app_exec top function is estimated to take 7.92K cycles, while it originally took 8.62K cycles, leading to an 8.2% improvement. You can also check how the functionality repartition has changed.
Code diff

By coming back to the optimization details, in the file tree, you may click on Compare file to see the code difference between before and after optimization.

Now, you may take advantage of the optimized code as you wish! Go faster, do more things with your power budget, it's up to you!
Don't forget to have a look to non-automatic optimizations too, so you can understand what is the problem and take decisions about what you could or could not be changing to improve your code performance even better.
Last updated