How does Duffs device work? - Stack Overflow What Duff's device does is implement this idea, in C, but (as you saw on the Wiki) with serial copies What you're seeing above, with the unwound example, is 10 comparisons compared to 100 in the original - this amounts to a minor, but possibly significant, optimisation
What does this C code do [Duffs device]? - Stack Overflow Its discovery is credited to Tom Duff in November of 1983, who at the time was working for Lucasfilm It is perhaps the most dramatic use of case label fall-through in the C programming language to date Duff does not claim credit for discovering the concept of loop unrolling, just this particular expression of it in C