xcode build optimizations
I was fooling around with xcode's build setting's and to my surprise I got around a 15% overall speed improvement by selecting the unroll loops setting. Anyone know of any other build settings which give tangible speed improvements(I would try them all myself but with the build time required for each change it would take me forever).
Also the setting "relax ieee compliance gave me around a 15% increase as well, are there any adverse side effects from using setting such as these(I am not aware of any when it comes to testing my program)?
Also the setting "relax ieee compliance gave me around a 15% increase as well, are there any adverse side effects from using setting such as these(I am not aware of any when it comes to testing my program)?
NelsonMandella Wrote:Also the setting "relax ieee compliance gave me around a 15% increase as well, are there any adverse side effects from using setting such as these(I am not aware of any when it comes to testing my program)?
You mean side effects other than the numbers coming out being wrong? Of course, if all you do is add two numbers in your algorithm, it hardly matters. But if you could encounter singularities or rely on infinity/nan being what they're supposed to, there's trouble on the horizon.
What about division and multiplication?
I would go check out a list of gcc optimization flags.
Here's a couple of links to get you started:
http://tombarta.wordpress.com/2008/05/25/gcc-flags/
and
http://developer.apple.com/documentation...mmary.html
Hope that helps
-wyrmmage
Here's a couple of links to get you started:
http://tombarta.wordpress.com/2008/05/25/gcc-flags/
and
http://developer.apple.com/documentation...mmary.html
Hope that helps

-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com/forum/
DoG Wrote:You mean side effects other than the numbers coming out being wrong? Of course, if all you do is add two numbers in your algorithm, it hardly matters. But if you could encounter singularities or rely on infinity/nan being what they're supposed to, there's trouble on the horizon.
Actually I compile Chipmunk using -ffast-math on PPC, x86 and the iPhone. Pretty sizable performance boost. Supposedly that disables specific checks for nan and infinity, but the code still runs fine and Chipmunk does rely on infinite values for some things. My guess is that the FPU used most modern CPUs simply does these checks internally.
People that have tried using that flag on a FPU-less CPU such as the DS or some other ARM processors have run into problems with -ffast-math though.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Using LLVM instead of GCC on 03 is better for math intensive code. (At least for mine)
LLVM will eliminate redundant calculations better than GCC. (Judged by the outputted assembly)
Also, if your function is over a certain size, don't inline!
I did tests with this and sometimes, inline will slow code down.
LLVM will eliminate redundant calculations better than GCC. (Judged by the outputted assembly)
Also, if your function is over a certain size, don't inline!
I did tests with this and sometimes, inline will slow code down.
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
XCode doesn't realize a library has changed unless you force your project to build. | XSTNX | 6 | 8,776 |
Jun 8, 2009 10:25 AM Last Post: XSTNX |
|
xcode build problem | NelsonMandella | 7 | 8,362 |
Apr 13, 2009 12:21 PM Last Post: szymczyk |
|
Build SDL Games with OS X and XCode | vmcodes | 6 | 7,281 |
Jan 13, 2008 10:26 PM Last Post: vmcodes |
|
Deployment build with XCode | guvidu | 1 | 4,440 |
Mar 22, 2007 09:20 AM Last Post: Malarkey |
|
XCode Build Question | DesertPenguin | 6 | 8,157 |
Jan 7, 2007 01:07 PM Last Post: OneSadCookie |