Run an optimization

1

Analysis results

On the analysis dashboard, click on Optimize.

2

Optimization strategy settings

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.

3

See optimization details

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.

4

Go to optimization kinds selection

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.

5

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 optimizations 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.

6

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.

7

Optimized code analysis

To go further, you can run a new analysis on the optimized code to acknowledge better the impact of the newly generated code.

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.

8

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.

Don't forget to have a look at 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