Use faster hash map lookup instead of array search
Use constant for match lookup