一句话:在 Apple Silicon 上对比原生 Arm 与可配置 TSO,发现 TSO 通常仅慢 3% 以内,挑战 Arm 弱内存模型的性能优势认知。
弱内存模型(如 Arm 模型)通常被认为比 TSO 等强内存模型能带来更高性能。本文在 Apple Silicon CPU 上检验这一认知:该平台可在运行时配置 TSO 模式,从而与原生 Arm 模式直接对比。作者在现代应用和经典基准测试上测量两种模式的执行时间,发现 TSO 模式基本保留了 Arm 弱内存优化的收益,执行时间通常与 Arm 模式相差 3% 以内。部分应用在 TSO 下出现更大减速,但作者追溯这些开销源于 Apple 的 TSO 实现细节,而非 TSO 排序约束本身。结果表明,在 Apple Silicon 上,Arm 内存模型相对于 TSO 并不具有显著的性能优势。
Weak memory models such as the Arm model are perceived as enabling higher performance than strong models such as TSO. We critically test this perception on Apple silicon CPUs, whose runtime-configurable TSO mode enables a direct comparison with native Arm mode. We find that Apple silicon TSO mode preserves Arm weak-memory optimizations, typically yielding execution times within 3% of Arm mode across modern applications and classic benchmarks. Although some applications experience higher TSO slowdowns, we trace these to artifacts of Apple's TSO implementation rather than inherent TSO ordering constraints. Our results challenge the perception that the Arm memory model offers a significant performance advantage over TSO in Apple silicon.