Enthernet Code
DIIDevHeads IoT Integration Server
•Created by UC GEE on 5/30/2024 in #middleware-and-os
What optimization levels maybe -O1 or -O2 are typically used for balancing performance and code size
@UC GEE
optimization levels like -O1 and -O2 are more used in embedded systems, they provide a good balance between code size reduction and performance improvement. They optimize the code by applying various techniques such as instruction scheduling, loop unrolling, and function inlining.
while
the -O3 optimization level do provide better performance improvements, I won't advise you use it in embedded systems due to the potential increase in code size. as larger code size can lead to higher memory usage and potentially impact the overall system's energy consumption.
6 replies