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. The XL compiler optimization suite performs best on well-written source code that has already been through a thorough debugging and testing process. Once your application source code is ready for optimization, consult the Why optimization is essential section for more information on the benefits optimization can provide.
Optimization techniques for the XL compiler family are built on a foundation of common components and capabilities that are then customized for the C, C++, and Fortran languages. All three language parser components emit an intermediate language processed using Interprocedural Analysis (IPA) and optimization components. The compilers also share a set of language-independent, high-performance runtime libraries to support capabilities such as symmetric multiprocessing (SMP) and high-performance complex mathematical calculations.
Sharing common components ensures that performance-enhancing optimization techniques available to you in one language are available to you in all of them. At the highest levels, the IPA optimizations can combine and optimize code from all three languages simultaneously when linking an application.
Though it is unnecessary to hand-optimize your code, compiler-friendly programming can be extremely beneficial to the optimization process. Unusual constructs can obscure the characteristics of your application and make performance optimization difficult. The section Compiler-friendly programming techniques contains tips for writing more easily optimized source code.
As you begin the optimization process, it is important to remember that not all optimization techniques suit all applications. Trade-offs sometimes occur between an increase in compile time, a reduction in debugging capability, and the improvements that optimization can provide. Learning about, and experimenting with different optimization techniques described in this guide can help you strike the right balance for your XL Fortran applications, while achieving the best possible performance. For more information on your optimization alternatives, see: