3 ms·
Okay, this definitely helps but I'm still struggling (sorry), I'm probably focusing too much on minutiae but: * At the static level, what does it mean to start
by philbo 16y ago
Okay, this definitely helps but I'm still struggling (sorry), I'm probably focusing too much on minutiae but:
* At the static level, what does it mean to start the loop at `case 0` then fall through to the termination of the loop? Part of me is surpisued that it even compiles (again, sorry); it's like the mechancis of the loop itself become dependent on the runtime input, at which point my brain begins to frazzle gently.
* Why is the `to` pointer never incremented? Is that some super-clever thing that I'm not seeing or is it just left out of the algorithm for clarity?
(EDIT: Formatting)
- sb 16y ago- case 0 is first, because this indicates that the modulo operation in the switch statement (count % 8) has no remainder, i.e., all 8 copy instructions should be executed. So, this is first because of the properties of the modulo operation. - the to pointer is not incremented because it corresponds to a single memory mapped output register (http://en.wikipedia.org/wiki/Duff%27s_device#Original_version http://en.wikipedia.org/wiki/Duff%27s_device#Original_versio...). It does not have anything to do with the use if Duff's device. hth