Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Loop nest optimization

Algorithm Classification

Loop nest optimization is a compiler technique that applies a set of loop transformations to nested loops, meaning a loop placed inside another loop, in order to improve memory locality, expose parallelism or cut loop overhead. A classical use is to reduce memory access latency, or the cache bandwidth a program needs, by reusing data held in the cache, which matters most for common linear algebra routines such as matrix multiplication. The central method is loop tiling, also called loop blocking or strip mine and interchange, which splits a loop's iteration space into smaller blocks so that the array elements a block touches fit in cache and stay there until they are reused. Choosing a good tile size is not easy, because it depends on the accessed array regions and on the cache size of the target machine, and cache-oblivious algorithms take the opposite route by using any cache efficiently without explicit blocking.

Connections

In Field

Source Loop nest optimization (Wikipedia)
Sources
Loop nest optimization (Wikipedia)
  • In Field: Programming Language Theory, Lead, compiler theory
    In computer science and particularly in compiler design, loop nest optimization (LNO) is an optimization technique
  • In Group: Compiler and Language Implementation Techniques, Lead, classification
    a set of loop transformations for the purpose of locality optimization or parallelization or another loop overhead reduction of the loop nests
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.