Duff's Device - Background

Background

Loop unrolling revolves around lowering the number of branches made, by batching them together. To handle cases where the number of iterations is not divisible by the unrolled-loop increments, a common technique is to jump directly into the middle of the unrolled loop for copying the remainder.

Duff was looking for a similar optimization for his case, and succeeded in doing so in C, unrolling a loop into a loop which assigns (up to) 8 values on each iteration.

Read more about this topic:  Duff's Device

Famous quotes containing the word background:

    ... every experience in life enriches one’s background and should teach valuable lessons.
    Mary Barnett Gilson (1877–?)

    In the true sense one’s native land, with its background of tradition, early impressions, reminiscences and other things dear to one, is not enough to make sensitive human beings feel at home.
    Emma Goldman (1869–1940)