What are the advantages of armv7 over armv6 when compiling iPhone applications?

If you have any advantages ... nothing convincing has been found in the documents.

Apparently armv7 is for the new version of iOS ... is it faster? smaller? Better in X?

+67
ios objective-c iphone xcode armv7
Jul 22 2018-10-22T00:
source share
6 answers

One of the big differences is that the armv6 architecture has hardware support for double-precision floating-point arithmetic, while armv7 only provides legacy software support for double-precision floating-point arithmetic.

To compensate, there is a "NEON" block in the armv7 architecture, which provides blindingly fast hardware support for single-precision floating-point arithmetic.

This is what you need to consider if you are doing anything related to floating point arithmetic, whether you are doing it in single or double precision. If you do this with double precision, but don't necessarily need that precision, you can probably significantly improve performance on armv7 devices, using single precision instead.

Apple has embraced the many differences between armv6 and armv7 and introduced Accelerate at one of its WWDC sessions this year. The video must be available on iTunes (as of July 10).

+54
Jul 22 '10 at 16:17
source share

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 ..."
+79
Jul 22 '10 at 17:26
source share

You must compile both if you want your application to run on the iPad and on all iPhone / iPod toch models. Older iOS devices use arm6, and newer ones use arm7.

The only reason not to compile for one or the other is to reduce the size of the application, since it only needs one compiled version of the code. But if you have a seriously serious code base, the difference in the size of this file will be quite insignificant.

+3
Jul 22 2018-10-22T00:
source share

arm7 is more optimized for iPod Touch (3rd Gen) and iPhone 3GS and newer. When creating old devices, you need to use "Standard / arm6 + arm7". In practice, I have not seen a big difference in performance in my applications.

+3
Jul 22 '10 at 16:11
source share

For me, the main advantages of ARMv7 are:

  • finger-2
  • NEON

NEON must be explicitly encoded, you are not using it, just recompiling, but if you can spend time, it can speed up multimedia / game operations by 8 times. However, thumb-2 is a largely free code size reduction with almost no flaws (unlike the thumb on ARMv6, which makes floating point code much slower compared to ARM mode). Of course, adding another version of your executable to ARMv7 will not reduce your executable size, but it will decrease your code in memory, caches, etc.

+3
Jul 22 '10 at 21:11
source share

Look at this link, it has a good description of the advantages, differences, etc.

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0001a/CHDEFAGB.html

+1
Oct 19 '12 at 23:37
source share



All Articles