[应用相关] 代码优化等级说明

[复制链接]
527|1
 楼主| 232321122 发表于 2023-2-25 10:20 | 显示全部楼层 |阅读模式
  • level 0 : Minimum optimization. Turns off most optimizations.It gives the best possible debug view and the lowest level of optimization.
最小优化。关闭大多数优化。它提供了最佳的调试视图和最低级别的优化。
  • level 1 : Restrictedoptimization. Removes unused inline functions and unused static functions.Turns off optimizations that seriously degrade the debug view. Ifused with --debug, this option gives a satisfactorydebug view with good code density.
限制优化。删除未使用的内联函数和未使用的静态函数。关闭严重降低调试视图的优化。如果与--debug一起使用,该选项提供了一个具有良好代码密度的令人满意的调试视图。
  • level 2 : Highoptimization. If used with--debug, the debug viewmight be less satisfactory because the mapping of object code tosource code is not always clear.
高度优化。如果与--debug一起使用,debug视图可能不太令人满意,因为目标代码到源代码的映射并不总是清晰的。
  • level 3 : Maximumoptimization.-O3 performs the same optimizations as -O2.However the balance between space and timeoptimizations in the generated code is more heavily weighted towardsspace or time compared with-O2.
最大化优化。-O3执行与-O2相同的优化,但是生成代码中的空间和时间优化之间的平衡比S-O2更盛一筹。

单片小菜 发表于 2023-2-27 11:35 | 显示全部楼层
前些天,设置不了断点,就是因为优化的级别太高了。弄了好久。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3

主题

2416

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部