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

查看:26
本文介绍了iPhone 和 iPad 上的缓存行大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

What is the cache line size on iPhone and iPad?

而且它在不同的设备和 CPU 之间有很大差异吗?用 google 不太容易找到.

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. :)

推荐答案

好吧,Cortex-A8 有 64 字节行,Cortex-A9 有 32 字节行,至于 Swift 和 Cyclone 我不知道 - 查看类似的内核(A15、A57、Scorpion、Krait)32 或 64 字节似乎是可能的.无论哪种方式,iOS7 机器上至少有 2 种不同的长度.

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.

这篇关于iPhone 和 iPad 上的缓存行大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆