Older iOS devices (iPhone, iPhone 3G, first and second generation iPod touch) had processors that only supported the armv6 instruction set. The iPhone 3G S (both the third-generation iPad and iPod touch) has a newer processor that also supports the armv7 instruction set. In general, armv7 runs faster on these new processors, and it is recommended that you at least enable the build of armv7 in your applications in the future (in the iPad application only you can just build for armv7).
As Jasarien points out, the area of greatest difference between instruction sets is in floating point operations. In armv6, applications were typically created using the Thumb instruction set to create smaller binaries, but the performance of the Thumb floating point was terrible. So you need to disable Thumb, you need faster floating point calculations. On armv7, the Thumb-2 instruction set no longer has this limitation, so Apple recommends you compile it almost all the time.
You can make the Thumb build setting conditional so that it is turned off for older devices and turned on for newer ones. To do this, go to the Xcode build settings and select the Compile for Thumb option. Go to the menu in the lower left-hand corner of the screen and select the "Add Settings" option. In the new build configuration state, select ARMv6 for the architecture, disable Thumb, add another condition, select ARMv7 for your architecture and enable Thumb for it.
According to Stephen Canon's answer here , single and double precision floating point operations are supported in hardware in armv6. I found that arithmetic with one precision performs slightly better on this platform, possibly due to more cache related operations. On armv7, the floating point NEON SIMD block only works with single precision operations, so there can be a huge performance difference between single and double precision operations.
Other issues that may be of interest to this topic include:
- What are the benefits / consequences of compiling an architecture for armv7 only?
- How does changing the armv6 / armv7 architecture to armv6 affect my iPad app? Will there be a loss in performance / stability?
- IPhone Discovery Model / NEON Support
- "Fast sine / cosine for ARMv7 + NEON: search for testers ..."
Brad Larson Jul 22 '10 at 17:26 2010-07-22 17:26
source share