Enabling Basic Optimization To enable basic optimizations, use the -O option (equivalent to +O2), as follows: cc -O sourcefile.c Basic optimizations do not change the behavior of ANSI C standard-conforming code. They improve run-time execution time but only increase compile time and link time by a moderate amount.