HP Fortran Programmer's Guide (March 2010)
Performance and optimization
Chapter 6144
of optimization to be applied to your program) or the -O option for the default level of
optimization (level 2). The -O option is provided for compatibility with the POSIX standard
and has the same functionality as the +O2 option.
The following command line compiles prog.f90, using the default level of optimization:
$ f90 -O prog.f90
For most applications, -O provides effective optimization. However, some applications can
realize significant increases in performance at higher levels of optimization or when you use
other features of the optimizer to boost performance. This chapter discusses these features as
well as the following topics:
• Using profilers
• Using options to control optimization
• Conservative vs. aggressive optimization
• Parallelizing HP Fortran programs
• Vectorization
• Controlling code generation for performance
For information about getting the best performance from floating-point intensive applications
running on HP-UX, see the HP-UX Floating-Point Guide.