Faster dictionary -> class mapper