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

Avoid hashing for single-entry maps #316

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Feb 25, 2024

We already avoid hashing for get/remove on empty maps, but we can also
do this for single-entry maps. Even with a cheap hash function, a single
equality check ought to be faster than any hash table lookup.

We already avoid hashing for get/remove on empty maps, but we can also
do this for single-entry maps. Even with a cheap hash function, a single
equality check ought to be faster than any hash table lookup.
@cuviper cuviper added this pull request to the merge queue Feb 26, 2024
Merged via the queue into indexmap-rs:master with commit e0a7f23 Feb 26, 2024
15 checks passed
@cuviper cuviper deleted the trivial-search branch February 27, 2024 02:25
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.

1 participant