Casting from int
to an enum is extremely cheap… it’ll be faster than a dictionary lookup. Basically it’s a no-op, just copying the bits into a location with a different notional type.
Parsing a string into an enum value will be somewhat slower.
I doubt that this is going to be a bottleneck for you however you do it though, to be honest… without knowing more about what you’re doing, it’s somewhat hard to recommendation beyond the normal “write the simplest, mode readable and maintainable code which will work, then check that it performs well enough.”