Distinguishing between optimization and tuning

You can use optimization and tuning separately or in combination to increase the performance of your application. Understanding the difference between them is the first step in understanding how the different levels, settings, and techniques can increase performance.

Optimization

Optimization is a compiler-driven process that searches for opportunities to restructure your source code and give your application better overall performance at run time, without significantly impacting development time. The XL compiler optimization suite, which you control using compiler options and directives, performs best on well-written source code that has already been through a thorough debugging and testing process. These optimization transformations can bring the following benefits:

  • Reduce the number of instructions that your application executes to perform critical operations.
  • Restructure your object code to make optimal use of the PowerPC® architecture.
  • Improve memory subsystem usage.
  • Exploit the ability of the architecture to handle large amounts of shared memory parallelization.

Each basic optimization technique can result in a performance benefit, although not all optimizations can benefit all applications. Consult the Steps in the optimization process for an overview of the common sequence of steps that you can use to increase the performance of your application.

Tuning

Tuning is a developer-driven process where you experiment with changes, for example, to source code or compiler options, to allow the compiler to do a better job of optimizing your program. While optimization applies general transformations designed to improve the performance of any application in any supported environment, tuning offers you opportunities to adjust specific characteristics or target execution environments of your application to improve its performance. Even at low optimization levels, tuning for your application and target architecture can have a positive impact on performance. With proper tuning the compiler can make the following improvements:
  • Select more efficient machine instructions.
  • Generate instruction sequences that are more relevant to your application.
  • Select from more focussed optimizations to improve your code.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us