Alex Rivera | Logout

ARM vs Thumb performance on iPhone 3GS, non floating point code

Asked 2009-07-29T05:25:23.207
24

I was wondering if anyone had any hard numbers on ARM vs Thumb code performance on iPhone 3GS. Specifically for non-floating point (VFP or NEON) code - I'm aware of the issues with floating point performance in Thumb mode.

Is there a point where the extra code size of bigger ARM instructions becomes a performance hazard? In other words, if my executable code is relatively small compared to available memory, is there any measured performance difference to turning Thumb mode on?

The reason I ask is that while I can enable ARM for the NEON specific source files in Xcode using the "-marm" option, this breaks the Simulator build because GCC is building x86. I was wondering whether I should just turn off "compile as thumb" and be done with it.

Edit
Report

1 Answer

0

Thumb code will essentially always be slower than equivalent ARM. The one case where Thumb code can be a big performance win is if it makes the difference between your code fitting into on-chip memory or cache.

It's hard to give exact numbers on performance differences, because it's entirely dependent on what your code actually does.

You can set per-architecture compiler flags in XCode, which would avoid breaking the simulator build. See the XCode build setting documentation.

answered 2009-07-29T12:35:29.030

Your Answer