11.1. Compilers and Optimization

Compiler optimization uses compiler command options or directives to perform specific types of code modification as the compiler is building object code. For most compilers, the first step is the creation of low-level intermediate code, which the optimizer then modifies in specific ways. Depending on the optimization level you choose, the optimizer may create object code directly, or it may output intermediate code that can be further optimized at link time when the scope of the optimization is broader.

Figure 11-1 shows the relationship of various programming languages, compilers, and the linker.

Figure 11-1. Languages, Compilers, and Optimization

Optimization is invoked with command line options or through ...

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.