Duff’s Device: loop unrolling for interpreted languages
In 1983, Tom Duff invented a really strange way to use the C language’s switch and case statements for the in code “unrolling” optimization of large loops. As an example, he described a simple loop that copies an array to an output register: send(to, from, count) register short *to, *from; register count; { do *to […]