My situation is that I'm making a messaging system for a component based system where messages can be looked up/sent by either an integer or string value. I'd like to use the string values for local code because it's easier to handle, and I'd like integer values to be used so I can send messages over a network instead of a string value.
Normally I'd use an enum for easy reference and keep everything integer-based, but I want this to be dynamic so that I can add or remove message types and values.
I figure I need to use a dictionary with an integer key and string value, but i'm trying to figure out if I will run into performance issues searching by value instead of searching by key. I shouldn't need to worry about unique values (i'll use a hashset to make sure they are all unique).
BLUF: do I need to worry about performance issues when getting an item by value instead of by key?