2

The loop unrolling factor should be chosen meticulously. It should be chosen in such way that the unrolled loop will not overflow the instruction cache, cause it will cause capacity cache misses.

I was looking to find if their is a limit for the value of unrolling factor, and i have find this article An Aggressive Approach to Loop Unrolling. date 1995 :

It use R2000 machine to show that unrolling the loop 15 times is sufficient to extract most of the benefits for this kinda of machine (knowing that R2000 it's cache can accommodate a maximum of 16K (16384) instructions).

Increasing the unroll factor further will improve benefits marginally. Our results shown later support this hypothesis. But such a big unroll factor should be used only if the unrolled loop will not overflow the instruction cache, thus causing capacity cache misses (extract from the article).

This lead me to ask if their is a mathematical correlation between cache size and the max unroll factor that can be tested?

How to determine the limit value of the loop unrolling factor ?

DINA TAKLIT
  • 7,074
  • 10
  • 69
  • 74

0 Answers0