关于ARM Keil5 Optimization level 优化等级的一些分析

54 篇文章 5 订阅 ¥69.90 ¥99.00
本文详细介绍了ARM Keil5编译器的-O0到-O3四个优化等级,分析了不同等级下代码优化、调试信息、代码大小和执行效率的影响。-O0保留更多源代码特性,适合调试;-O1和-O2提高性能,牺牲部分调试友好性;-O3最大化优化,可能影响代码逻辑。建议根据项目需求选择合适的优化等级。
摘要由CSDN通过智能技术生成

官网文档:
https://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm

Optimization
Control compiler code optimization for the generated code. Sets the compiler command-line option -Onum:
Default: Use the compiler default or the setting of a higher Target or Group level.
Level 0 (-O0): Turn off all optimization, except some simple source transformations.
Level 1 (-O1): Turn off optimizations that seriously degrade the debug view.
Level 2 (-O2): High optimization (default level). The debug view might be less satisfactory because the mapping of object code to source code is not always clear.
Level 3 (-O3): Maximum optimization. Note that Level 3 in combination with Optimize for Time may generate more code that Level 2 since it may unroll

  • 14
    点赞
  • 66
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值