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

Use hashbrown::raw::RawTable for SizedCache #59

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

cuviper
Copy link
Contributor

@cuviper cuviper commented Sep 12, 2020

Rather than duplicating the keys in store and order, we can use
store: RawTable<usize> that just indexes order.

Cargo.toml Outdated Show resolved Hide resolved
src/stores.rs Outdated
}
}
}

impl<K: Hash + Eq + Clone, V> Cached<K, V> for SizedCache<K, V> {
impl<K: Hash + Eq, V> Cached<K, V> for SizedCache<K, V> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that K: Clone is no longer required.
(Although it might be desirable to keep that for API stability.)

Rather than duplicating the keys in `store` and `order`, we can use
`store: RawTable<usize>` that just indexes `order`.
@cuviper
Copy link
Contributor Author

cuviper commented Dec 9, 2020

I've rebased to resolve the merge conflicts.

@jaemk jaemk mentioned this pull request Dec 10, 2020
@jaemk
Copy link
Owner

jaemk commented Jan 7, 2021

Looks good, thanks for putting this together and resolving those conflicts!

@jaemk jaemk merged commit 9a8db86 into jaemk:master Jan 7, 2021
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.

2 participants