Skip to content

maybe expose a way to pass pre-calculated hashes along with hash table keys #794

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

Open
steveklabnik opened this issue Feb 2, 2015 · 1 comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

Issue by thestinger
Tuesday Nov 26, 2013 at 03:05 GMT

For earlier discussion, see rust-lang/rust#10661

This issue was labelled with: A-libs, I-enhancement, I-slow in the Rust repository


I found this was necessarily to avoid double-hashing with a shard-based concurrent hash table like Java's ConcurrentHashMap as the hash needs to be calculated to pick the correct shard.

https://github.com/thestinger/rust-core/blob/master/core/concurrent.rs#L299

This could be done by hoisting out the open-addressing implementation, but it will result in it requiring the hashes to be stored in the table rather than it just being an implementation detail.

@ticki
Copy link
Contributor

ticki commented Dec 6, 2015

This should be possible with the landing of const fn.

@petrochenkov petrochenkov added T-libs-api Relevant to the library API team, which will review and decide on the RFC. and removed A-libs labels Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

3 participants