Quantifiable Performance Boosts from Loop Tiling
Effective loop tiling can lead to substantial performance improvements, with observed speedups ranging from 1.2x to over 10x in various benchmarks. For memory-bound operations like certain stencil computations, it can outperform previous compiler techniques by a factor of 2x to 10.14x, and general applications can see improvements up to 49%.
The top 3
- Average & Peak Speedups on Standard Benchmarks: Loop tiling can significantly boost performance, with an average speedup of 4.9% and peak gains of up to 21% on SPEC CPU95 floating-point benchmarks, and an average of 11% with peaks up to 49% on SPEC CPU2000 Fortran 77 benchmarks.
- Quantifiable Reduction in Cache Misses: The primary benefit of loop tiling is a substantial reduction in cache misses, a key metric for performance. Analytical models can estimate cache misses with high accuracy, around 1% using simulation and 3-5.5% with hardware counters for L1 and L3 caches, leading to more efficient tile size selection.
- Matrix Multiplication's Peak Performance Gains: Loop tiling is particularly effective for memory-bound operations like matrix multiplication, transforming them into compute-bound tasks. For a 1680x1680 matrix multiplication, optimizing tile size reduced runtime on an Intel i5-10210U from 2.88 seconds (tile size 8) to 1.67 seconds (tile size 12).
Sources
Open the full topic