Skip to main content

Table 5 Advantages and drawbacks of various compiler optimisation levels

From: An efficient permutation approach for SbPN-based symmetric block ciphers

Compiler optimization level

Advantages

Drawbacks

-O0

High correlational view between source and generated codes

Quick build and compile

Easy Debugging

Best for prototyping

No Optimisations enabled

Large Code-size

Higher execution-time

-O1

Better debug view

Good stack utilisation

High Memory Requirements

High Execution-time

-O2

High Speed

Larger Code-size

-O3

High Speed

Larger Code-size

Poor correlational view between source and generated codes

-Ofast

High Speed

Larger Code-size

Poor correlational view between source and generated codes

May perform optimisations that are not standard compliant

-Oz

Reduced Memory Footprint

Slower execution

-Os

Balanced speed and memory usage

Moderate performance