What is the cache line size on iPhone and iPad?

淺唱寂寞╮ 提交于 2019-12-08 07:39:30

问题


What is the cache line size on iPhone and iPad?

And does it vary much between the different devices and CPUs? This is not too easy to find with google.

I need to squeeze some extra performance from my app. :)


回答1:


Well, the Cortex-A8 has 64-byte lines, Cortex-A9 has 32-byte lines, as for Swift and Cyclone I don't know - looking at comparable cores (A15, A57, Scorpion, Krait) 32 or 64 bytes seems likely. Either way there's at least 2 different lengths across iOS7 machines.

As you're performance-focused though, remember that benchmarking is infinitely more valuable than theorising - try as many reasonable combinations of code on every piece of hardware you can lay your hands on, go with what's fastest in practice regardless of what 'should' be best.



来源:https://stackoverflow.com/questions/22132821/what-is-the-cache-line-size-on-iphone-and-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!