Much more likely to be the opposite in the case of small switches on integers like this. The benefits of a hash table in absolute measures are only apparent when the number of elements grow upwards, i.e. it's the scalability that is so desirable.

This example in particular happens to be the poster child candidate for a jump table optimization, too.