I also don't see how a hash map is going to be faster then a compiler generated lookup table for a switch statement. If the method is inlined and the invocation value type is a constant the compiler will also be able to inline the size which it can't do if you use a hash map.