C: Trick or Treat?

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 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s