Application performance is viewed in the context of hardware, operating systems, and serial and parallel environments. For applications running in a serial environment, you can optimize the performance by using appropriate compiler flags that help the applications use hardware resources efficiently. For applications running in a parallel environment, you can use the compiler options to take advantage of multiple cores and multiple threads of execution to optimize performance of the applications. You can use auto-parallelization and OpenMp compiler flags to build and run parallel versions of an application.
The following figure shows the Oracle Developer Studio compiler options that are used for optimizing serial and parallel performance of applications.
Figure 1 Oracle Developer Studio Compiler Options
Optimization flags affect the following three important characteristics:
The compilation time
The runtime of the compiled application
The amount of debug activity that is possible with the final binary
In general, the higher the level of optimization, the faster the application runs and the longer it takes to compile, but the less debug information is available. The impact of optimization levels varies from application to application.