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

chore: Optimize HashMap: unconstrained approach #4605

Closed
wants to merge 2 commits into from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Mar 20, 2024

…of concept

Description

Problem*

Resolves #4584

Summary*

This branch optimizes HashMap using an unconstrained approach suggested by @zac-williamson. This PR is here to show the differences of this approach, but the timings and benchmark information are on the PR with the bucketed approach here: #4603

Additional Information

The current approach in this PR is not yet abstracted to any key or value type. When this is done it should be noted that this approach also requires Ord on the key type.

It's also unclear if the unconstrained approach would be as efficient for an API returning an optional value in get. I think in the None case we would need to iterate through the entire hashmap to assert that they key isn't present to prevent under constraining the result value.

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [Exceptional Case] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher
Copy link
Contributor Author

jfecher commented Mar 21, 2024

Closing this PR, its too much spam to open each branch as a separate PR

@jfecher jfecher closed this Mar 21, 2024
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

Successfully merging this pull request may close these issues.

Optimize HashMap
1 participant