`EncoderLookup.Keys.Contains` would be an O(1) lookup in a Dictionary (hashtable); this is an O(n) scan of a string.