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

Should hashlink no longer depend on hashbrown? #13

Open
Zizico2 opened this issue Jul 3, 2021 · 4 comments
Open

Should hashlink no longer depend on hashbrown? #13

Zizico2 opened this issue Jul 3, 2021 · 4 comments

Comments

@Zizico2
Copy link

Zizico2 commented Jul 3, 2021

The SwissTable implementation in hashbrown as been merged to std. rust-lang/rust#58623
Should the dependency be kept or should this use the std version?

@rusty-snake
Copy link

The default hasher of std and the hashbrown crate are still different:

The default hashing algorithm is currently SipHash 1-3

The default hashing algorithm is currently AHash

So hashbrown::HashMap is still faster than std::collections::HashMap. However type HashMap<K, V> = std::collections::HashMap<K, V, ahash::RandomState> should have the same performance as hashbrown::HashMap IIUC.

@PsiACE
Copy link

PsiACE commented Aug 24, 2021

love this idea

@Dushistov
Copy link

Two versions of hashbrown seems overkill.

@kyren
Copy link
Owner

kyren commented Mar 14, 2022

Unfortunately, the raw table API is not stabilized in std, which is the only real reason that this crate depends directly on hashbrown. Ideally, hashbrown would be completely unnecessary.

Once the raw table API is stabilized, this crate can easily shift over to use the HashMap types directly from std.

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

5 participants