Using the Compiler Optimizer Flags

Learn about optimizer flags that instruct the compiler to improve code performance.

We'll cover the following

There are a number of levels of “optimization” that we can request from the gcc compiler at compile time. Turning on the optimizer flags asks the compiler to attempt to improve the performance (speed) of the code, typically at the expense of compilation time, (sometimes code size), and (usually) debugging ease.

If we type this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy