I'm surprised by the if chain one. I tried it using cremno's gcc.godbolt.org suggestion, and the newest gcc doesn't turn it into a jump table like the author suggests, but clang does.
http://goo.gl/PgqAIs <-- The code
http://goo.gl/PgqAIs <-- The code
No comments yet.