Optimize the use of IF in a list

There’s absolutely nothing wrong with having redundancies in order to promote clarity in your graph logic. In my opinion, optimization should also include ease of understanding and flexibility.

More nodes means more executions which means longer run time, but you’re not doing anything particularly heavy so I don’t think it will be noticeable. It’s up to you to decide what is a reasonable run time for your graph, but I would expect this to run almost instantaneously.

As for optimizing what you currently have…
The middle section is the actual graph logic that you are executing and it’s only three nodes and your inputs. Everything to the left of this section is the dictionary setup, which, like I mentioned, could be manually written out in a single node or two - but it’s up to you to decide whether you want to trade “easy” for “optimized” and to what extent. Everything to the right of this section seems to be converting values from your dictionary to something else, which tells me you didn’t set your dictionary up correctly the first time. The whole point of the dictionary is to convert one set of values to another. If you’re having to do a second conversion then you likely don’t have all the appropriate values in the dictionary.