开发者

Using gcc compiler flag in Xcode

开发者 https://www.devze.com 2022-12-26 21:29 出处:网络
Shark has identified a area of code to be improved - Unaligned loop start and recommends adding 开发者_JS百科-falign-loops=16 (gcc compiler flag). I\'ve added this to

Shark has identified a area of code to be improved - Unaligned loop start and recommends adding 开发者_JS百科-falign-loops=16 (gcc compiler flag). I've added this to Other C flags in iphone Xcode both to the dependant project and top level project. However it still does not seem to affect the performance and Shark is still reporting the same problem so it appears it didn't work.

Am i doing this correctly?


The hints from Shark are not always helpful or appropriate - you have to make the final decision - if your loop is quite small then loop alignment might make a small difference, but there are probably much more important things that you would look at optimising before that.


Are you compiling C files or C++ files? If C++ then you might want to check they make it through to the Other C++ flags setting.

In the xcode build results window there is button to show the build transcript, and you can use this to make sure the compiler flags are making it through to gcc

0

精彩评论

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