duffs-device

How does Duff's device work?

I've read the article on wikipedia, on the Duff's Device, and I don't get it. I am really interested, but I've read the explanation there a couple of times and I still don't get it how the Duff's device works. Can some one attempt at a more detailed explanation? Thanks ...

Does Duff's Device Speed up Java Code?

Using the stock Sun 1.6 compiler and JRE/JIT, is it a good idea to use the sort of extensive unroll exemplified by Duff's Device to unroll a loop? Or does it end up as code obfuscation with no performance benefit? The Java profiling tools I've used are less informative about line-by-line CPU usage than, say, valgrind, so I was looking t...

Can I use Duff's Device on an array in C?

I have a loop here and I want to make it run faster. I am passing in a large array. I recently heard of Duff's Device can it be applied to this for loop? any ideas? for (i = 0; i < dim; i++) { for (j = 0; j < dim; j++) { dst[RIDX(dim-1-j, i, dim)] = src[RIDX(i, j, dim)]; } } ...