开发者

Recommended clang optimization level?

What's the "standard" op开发者_StackOverflow中文版timization level used for clang? I believe that "O2" is a good choice for gcc - does that hold for clang also, or is there a generally better alternative?


-O2 and -Os are both good choices for general use with clang.


-O3 will usually give you both the smallest and fastest code, but does tend to expose non obvious bugs in your code.

In general, you should make sure your code runs fine with all possible optimizations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜