Cache-Oblivious Algorithms

Author:

Frigo Matteo1,Leiserson Charles E.1,Prokop Harald1,Ramachandran Sridhar1

Affiliation:

1. MIT Laboratory for Computer Science

Abstract

This article presents asymptotically optimal algorithms for rectangular matrix transpose, fast Fourier transform (FFT), and sorting on computers with multiple levels of caching. Unlike previous optimal algorithms, these algorithms are cache oblivious : no variables dependent on hardware parameters, such as cache size and cache-line length, need to be tuned to achieve optimality. Nevertheless, these algorithms use an optimal amount of work and move data optimally among multiple levels of cache. For a cache with size M and cache-line length B where M = Ω ( B 2 ), the number of cache misses for an m × n matrix transpose is Θ (1 + mn / B ). The number of cache misses for either an n -point FFT or the sorting of n numbers is Θ (1 + ( n / B )(1 + log M n )). We also give a Θ ( mnp )-work algorithm to multiply an m × n matrix by an n × p matrix that incurs Θ (1 + ( mn + np + mp )/ B + mnp / BM ) cache faults. We introduce an “ideal-cache” model to analyze our algorithms. We prove that an optimal cache-oblivious algorithm designed for two levels of memory is also optimal for multiple levels and that the assumption of optimal replacement in the ideal-cache model can be simulated efficiently by LRU replacement. We offer empirical evidence that cache-oblivious algorithms perform well in practice.

Funder

National Science Foundation

Division of Computing and Communication Foundations

Division of Computer and Network Systems

Defense Advanced Research Projects Agency

Publisher

Association for Computing Machinery (ACM)

Subject

Mathematics (miscellaneous)

Reference41 articles.

1. The input/output complexity of sorting and related problems

2. A model for hierarchical memory

3. Hierarchical memory with block transfer

4. Aho A. V. Hopcroft J. E. and Ullman J. D. 1974. The Design and Analysis of Computer Algorithms. Addison-Wesley Publishing Company. Aho A. V. Hopcroft J. E. and Ullman J. D. 1974. The Design and Analysis of Computer Algorithms . Addison-Wesley Publishing Company.

5. Uniform memory hierarchies

Cited by 90 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Efficient detection of redundancies in systems of linear inequalities✱;Proceedings of the 2024 International Symposium on Symbolic and Algebraic Computation;2024-07-16

2. HINT: Designing Cache-Efficient MPI_Alltoall using Hybrid Memory Copy Ordering and Non-Temporal Instructions;2024 IEEE International Parallel and Distributed Processing Symposium (IPDPS);2024-05-27

3. Robust External Hash Aggregation in the Solid State Age;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13

4. PieRank: Embedded Large-Scale Sparse Matrix Processing;2023 IEEE International Conference on Big Data (BigData);2023-12-15

5. Cache Optimization and Performance Modeling of Batched, Small, and Rectangular Matrix Multiplication on Intel, AMD, and Fujitsu Processors;ACM Transactions on Mathematical Software;2023-09-19

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3