11.2. Optimization Levels
Table 11-1 shows the basic optimization levels that are included in many compilers and indicates how they are invoked:.
Level | Description | Command Line Option | C Directive | Fortran Directive |
---|---|---|---|---|
0 | Very little optimization. | PA-RISC: the default, so no flag needed IPF: +O0 | #pragma opt_level 0 #pragma optimize off | $Optimize off |
1 | Local optimization within block boundaries only. | PA-RISC: +O1 IPF: the default, so no flag needed | #pragma opt_level 1 | $Optimize level 1 on |
2 | Global optimization within procedures only. | -O or +O2 | #pragma opt_level 2 | $Optimize level 2 on |
3 | Full optimization across all procedures within a single file. | +O3 | #pragma opt_level 3 | $Optimize level 3 on |
4 | Full optimization across the entire application ... |
Get HP-UX 11i Tuning and Performance now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.