3 ms·
it's just like C's switch, right? not at all, absolutely not. consider: switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from
by contras1970 10y ago
it's just like C's switch, right?
not at all, absolutely not. consider:
switch (count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while (--n > 0);
}
https://en.wikipedia.org/wiki/Duff's_device https://en.wikipedia.org/wiki/Duff's_device