Chelsea
Chelsea

Reputation: 29

What is the difference between O1 and Os?

May I know what is the difference between O1 and Os? I only the firmware size compiled by Os is smaller than O1. However, what is the different in performance wise? Would it has much different?

Upvotes: 0

Views: 443

Answers (1)

R.. GitHub STOP HELPING ICE
R.. GitHub STOP HELPING ICE

Reputation: 215241

You can read about GCC's different optimization levels in the manual. In particular, -O1

tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time.

On the other hand, -Os means:

Optimize for size. -Os enables all -O2 optimizations except those that often increase code size

Upvotes: 1

Related Questions