DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C compilation system

Optimizing your program

The -O option to cc invokes the optimizer:

   $cc -O test.c
The optimizer improves the efficiency of the assembly language code generated by the compiler. That, in turn, speeds the execution time of your object code. Use the optimizer when you have finished debugging and profiling your program.

If you know the processor your code is normally run on, you can specify that cc should generate code that is optimized specifically for that processor (for example, -Ki486). For more information, see the -K option on the cc(CP) manual page.


Next topic: Link editing
Previous topic: Preparing your program for profiling

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003