The program performance on modern hardware is characterized by \emph{locality of reference}, that is, it is faster to access data that is close in address space to data that has been accessed recently than data in a random location. This is due to many architectural features including caches, prefetching, virtual address translation and the physical properties of a hard disk drive; attempting to model all the components that constitute the performance of a modern machine is impossible, especially for general algorithm design purposes. What if one could prove an algorithm is asymptotically optimal on all systems that reward locality of reference, no matter how it manifests itself within reasonable limits? We show that this is possible, and that excluding some pathological cases, cache-oblivious algorithms that are asymptotically optimal in the ideal-cache model are asymptotically optimal in any reasonable setting that rewards locality of reference. This is surprising as the cache-oblivious framework envisions a particular architectural model involving blocked memory transfer into a multi-level hierarchy of caches of varying sizes, and was not designed to directly model locality-of-reference correlated performance.
翻译:现代硬件上的程序性能的特征是 \ emph{ 地方参照}, 也就是说, 获取在地址空间接近的数据比在随机位置上的数据最近访问的数据要快得多。 这是因为许多建筑性能, 包括缓存、 预牵引、 虚拟地址翻译和硬盘驱动器的物理特性; 尝试模拟构成现代机器性能的所有构件是不可能的, 特别是对于一般算法的设计目的来说。 如果能够证明算法在奖励参考地点的所有系统上都是不那么最佳的, 不论它如何表现在合理的限度内? 我们表明这是可能的, 并且排除一些病理性案例, 在理想缓冲模型中具有同样最佳性能的缓存式算法, 在任何合理的环境中, 都无法进行最优化的模拟, 这令人吃惊, 因为缓存框架设想了一种特定的建筑模型, 包括将记忆传输阻塞到不同大小的多级缓存, 并且没有设计直接模拟参照地点的相关性表现。