Skip to content
Latchkey

Optimization Level - CI/CD Glossary Definition

Optimization level is a compiler flag that trades build time and debuggability for faster or smaller output code.

An optimization level is a compiler setting (for example -O0 through -O3, or -Os for size) that trades build time and debuggability against the speed and size of the generated code.

An optimization level is a compiler setting (for example -O0 through -O3, or -Os for size) that trades build time and debuggability against the speed and size of the generated code.

In CI

Use a low level (-O0 or -Og) for CI test builds to compile fast and keep debug info accurate; use a high level (-O2, -O3) for the release build. Optimized builds can expose undefined behavior that debug builds hide, so test both when it matters.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →