There are a lot of places in the intermediate where we need to be able to look up a value given its key, and also look up a key given its value. Currently we are maintaining two maps (or performing an expensive linear search) everywhere this is done.
I know that at least Apache Commons and Guava have implementations of a bidirectional map (bijective structure). I think it would be a good enhancement to use this structure instead wherever both forward and reverse lookup need to be performed.
There are a lot of places in the intermediate where we need to be able to look up a value given its key, and also look up a key given its value. Currently we are maintaining two maps (or performing an expensive linear search) everywhere this is done.
I know that at least Apache Commons and Guava have implementations of a bidirectional map (bijective structure). I think it would be a good enhancement to use this structure instead wherever both forward and reverse lookup need to be performed.