2009-12-04 UPDATE: For profiling results on a number of the suggestions posted here, see below!
Consider the following very
Put the cases in a sorted structure with non linear access (like a hash table). The switch that you have will have a linear time.