Generating a swtich is faster then looking up in an object.