Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3556

SDK • Re: Less code compiles larger

$
0
0
-O3 is optimization for speed vs size
-g generates debug info

If size is all that matters, you can try:
-Os
Optimize for size. -Os enables all -O2 optimizations except those that often increase code size:
It also enables -finline-functions, causes the compiler to tune for code size rather than execution speed, and performs further optimizations designed to reduce code size.

-Oz
Optimize aggressively for size rather than speed. This may increase the number of instructions executed if those instructions require fewer bytes to encode. -Oz behaves similarly to -Os including enabling most -O2 optimizations.

Statistics: Posted by gmx — Mon Oct 14, 2024 12:46 am



Viewing all articles
Browse latest Browse all 3556

Trending Articles