Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use a bijective structure for forward-reverse maps #27

Open
mtrberzi opened this issue Oct 8, 2014 · 0 comments
Open

refactor: use a bijective structure for forward-reverse maps #27

mtrberzi opened this issue Oct 8, 2014 · 0 comments
Assignees

Comments

@mtrberzi
Copy link
Member

mtrberzi commented Oct 8, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants