One of the things that amazes me about the C programming language is that you can always
find something new: it teaches you to be humble about your programming wizardry. Today I have found two new mind-melting techiques which can cause serious brain damage:
- Duff’s Device: speeding-up tight loops by unrolling and using a switch statement in order to create a jump table for the leftover iterations of the unrolled loop. Cheesy.
- Coroutines implemented in plain standard ANSI C. Contains heavy preprocessor abuse and some constructions derived from Duff’s Device.I definetely loved this one!
This was my christmas present for my readers, hope you found this enlightening 😉