热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

为什么在XCode中默认情况下循环展开?-WhyisloopunrollingoffbydefaultinXCode?

ItseemstheUnrollLoopsoptimizationsettingsundertheAppleLLVM8.0-CodeGenerationsectioni

It seems the Unroll Loops optimization settings under the Apple LLVM 8.0 - Code Generation section is turned off by default in the latest XCode, 8.2.1, even for the Release configuration. Any good reason for that? I thought loop unrolling was one of the most basic optimizations.

似乎Apple LLVM 8.0下的Unroll Loops优化设置 - 代码生成部分默认在最新的XCode,8.2.1中关闭,即使对于Release配置也是如此。有什么好理由吗?我认为循环展开是最基本的优化之一。

1 个解决方案

#1


1  

It seems it is disabled to avoid increasing the size of the generated code.

它似乎被禁用以避免增加生成的代码的大小。

Tuning for Performance and Responsiveness

调整性能和响应能力

Table 6-1 Compiler optimization options

表6-1编译器优化选项

Faster

更快

The compiler performs nearly all supported optimizations that do not require a space-time tradeoff. The compiler does not perform loop unrolling or function inlining with this option. This option increases both compilation time and the performance of generated code.

编译器几乎执行所有支持的优化,不需要空时权衡。编译器不使用此选项执行循环展开或函数内联。此选项会增加编译时间和生成代码的性能。

Fastest

最快的

The compiler performs all optimizations in an attempt to improve the speed of the generated code. This option can increase the size of generated code as the compiler performs aggressive inlining of functions. This option is generally not recommended.

编译器执行所有优化以尝试提高生成代码的速度。当编译器执行积极的函数内联时,此选项可以增加生成代码的大小。通常不建议使用此选项。


推荐阅读
author-avatar
丶沈丨灬de艳本人
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有