3

我们的应用程序使用了foursquare API,我对使用armv7架构进行编译的影响很感兴趣:

  • 定位精度
  • 速度(浮点计算)

使用 armv6 架构编译是否在定位精度或浮点计算速度方面提供任何相对优势?

有没有人测试过这个来测量实际差异?或者它太小而没有任何后果?

我想知道是否值得使用混合 armv6/armv7 构建来提高这两个性能元素,即使它会导致应用程序文件大小的名义增加?

谢谢。

4

2 回答 2

4

Does compiling with armv6 architecture provide any relative benefit in terms of location accuracy or speed of floating point calculations?

I think the bigger question here is; do you care if your app doesn't run on older ARMv6 based hardware? Because creating an ARMv7-only build will limit the number of devices your app supports.

Or is it too small to be of any consequence?

All depends on your situation... but, in my experience the clock speed of the ARMv6-based devices vs. the ARMv7-based devices is of much more significant consequence than any optimization differences the compiler makes between the two.

I'm wondering if it's worth it to use a hybrid armv6/armv7 build

This is the default - and unless you have a specific reason not to build for both - you should - it will guarantee best results on both ARMv6 and ARMv7-based devices - your only alternative if you want maximum compatibility is to build for ARMv6 only - which will guarantee you that if there were some place the compiler could optimize for ARMv7 you'd be losing out on those optimizations.

于 2012-01-07T19:55:54.153 回答
1

如果您在构建时同时启用了 ARMv6 和 ARMv7,并且不仅限于为活动架构构建 - 最终应用程序将具有 2 个二进制映像。一个用于 6,第二个用于 7。换句话说 - 您的选择是:仅为 V7 构建并且根本不支持 V6,或者为 6 和 7 构建并提供通用二进制文件。最后,设备将使用适当的二进制图像。不知道这很难选择...

我个人更喜欢支持尽可能多的设备,并且不同意 Apple 在 Xcode 4.2 中推动开发人员放弃对 ARMv6 设备支持的更改。

于 2012-01-07T21:32:33.447 回答