Compiler execution time
There are several factors that affect the execution time of the compiler.
In the operating system, the C compiler can be invoked by two different commands: cc and xlc. The cc command, which has historically been used to invoke the system's C compiler, causes the C compiler to run in langlevel=extended mode. This mode allows the compilation of existing C programs that are not ANSI-compliant. It also consumes processor time.
If the program being compiled is, in fact, ANSI-compliant, it is more efficient to invoke the C compiler by using the xlc command.
Use of the -O3 flag implicitly includes the -qmaxmem option. This option allows the compiler to use as much memory as necessary for maximum optimization. This situation can have two effects:
- On a multiuser system, a large -O3 compilation may consume enough memory to have an adverse effect on the performance experienced by other users.
- On a system with small real memory, a large -O3 compilation may consume enough memory to cause high paging rates, making compilation slow.