iPhone compile for thumb

quano picture quano · Sep 22, 2009 · Viewed 7.8k times · Source

I've heard it might be a good idea to turn off "compile for thumb" in an iPhone target's settings to increase performance. I'm having some trouble finding this setting though. Since I couldn't find it in my current project, I decided to make a new one (where I could find and set it), and copy my files over to it (and also update all libs I'm using at the same time).

But now it seems like this setting has disapperad from this new project also. No matter what SDK I choose, simulator or device, the setting will not show up in the target settings! I do seem however to still have a variable called GCC_THUMB_SUPPORT under the category "User-defined" all of the sudden. What is this?

I tried making a new target, but the setting will not show up in that either (not even GCC_THUMB_SUPPORT).

Answer

Thomas Zoechling picture Thomas Zoechling · Sep 22, 2009

GCC_THUMB_SUPPORT is the right variable. Just set it to NO to disable THUMB code generation.
A general rule of THUMB is, to disable it if your code is floating point heavy :)
More about that here.

Update:
The advice to compile for the THUMB instruction set is no longer valid (actually since the iPhone 3GS).