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

GeneralTaxonomy.tax_id_lookup should be no copy #19

Open
bovee opened this issue Jan 22, 2020 · 0 comments
Open

GeneralTaxonomy.tax_id_lookup should be no copy #19

bovee opened this issue Jan 22, 2020 · 0 comments

Comments

@bovee
Copy link
Contributor

bovee commented Jan 22, 2020

Right now we need to copy each item from tax_ids into the HashMap as a key (to avoid making the struct self-referential) for its lookup, but if we didn't have to do this we'd save some memory.

Options:

  • Make tax_id_lookup self-referential somehow. There are a couple libraries to allow things like this, but the ones I looked at are questionably sound
  • Make tax_id_lookup a HashMap<hash, IntTaxId> and handle all the hashing and collision detection ourselves (reinvent a lot of the HashMap). This may be similar to the NoHashHasher in finch with an additional collision check.
@bovee bovee mentioned this issue Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant