简体   繁体   English

iPhone和iPad上的缓存行大小是多少?

[英]What is the cache line size on iPhone and iPad?

What is the cache line size on iPhone and iPad? iPhone和iPad上的缓存行大小是多少?

And does it vary much between the different devices and CPUs? 在不同的设备和CPU之间差异是否很大? This is not too easy to find with google. 用Google很难找到这个。

I need to squeeze some extra performance from my app. 我需要从我的应用程序中压缩一些额外的性能。 :) :)

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. 好吧,Cortex-A8有64字节的行 ,Cortex-A9有32字节的行 ,至于我不知道的Swift和Cyclone-看类似的内核(A15,A57,Scorpion,Krait)似乎是32或64字节有可能。 Either way there's at least 2 different lengths across iOS7 machines. 无论哪种方式,iOS7机器上的长度至少有 2种不同。

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. 不过,由于您注重性能,因此请记住,基准测试比理论上的测试具有无限的价值-在您可以使用的每种硬件上尝试尽可能多的合理代码组合,无论实际情况如何,都应采用实践中最快的方法最好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM