The Cache Performance and Optimizations of Blocked Algorithms

161Citations
Citations of this article
87Readers
Mendeley users who have this article in their library.

Abstract

Blocking is a well-known optimization technique for improving the effectiveness of memory hierarchies. Instead of operating on entire rows or columns of an array, blocked algorithms operate on submatrices or blocks, so that data loaded into the faster levels of the memory hierarchy are reused. This paper presents cache performance data for blocked programs and evaluates several optimization to improve this performance. The data is obtained by a theoretical model of data conflicts in the cache, which has been validated by large amounts of simulation. We show that the degree of cache interference is highly sensitive to the stride of data accesses and the size of the blocks, and can cause wide variations in machine performance for different matrix sizes. The conventional wisdom of frying to use the entire cache, or even a fixed fraction of the cache, is incorrect. If a fixed block size is used for a given cache size, the block size that minimizes the expected number of cache misses is very small. Tailoring the block size according to the matrix size and cache parameters can improve the average performance and reduce the variance in performance for different matrix sizes. Finally, whenever possible, it is beneficial to copy non-contiguous reused data into consecutive locations. © 1991, ACM. All rights reserved.

Cite

CITATION STYLE

APA

Lam, M. D., Rothberg, E. E., & Wolf, M. E. (1991). The Cache Performance and Optimizations of Blocked Algorithms. ACM SIGPLAN Notices, 26(4), 63–74. https://doi.org/10.1145/106973.106981

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free