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

Created generic for hashers #3

Closed
wants to merge 8 commits into from

Conversation

LucaCappelletti94
Copy link
Contributor

This addresses issue #2, introducing a generic for arbitrary hashers. The default remains as before a seeded AHasher, but using the Default seeds from the library itself.

@jianshu93
Copy link

Hi Luca,

Can you please add xxh3 as a feature so that the hasher you added can call hash64_with_seed() in xxh3.

Thanks,

Jianshu

@LucaCappelletti94
Copy link
Contributor Author

I am not sure I understood, you can pass as a generic whatever you want. There is no need to add dependencies.

src/hyperloglog.rs Outdated Show resolved Hide resolved
@sundy-li
Copy link
Owner

There is no need to add dependencies.

That looks better to me. There are numerous hash crates, we don't need too many deps and features cause the Hash trait is commonly used.

@sundy-li
Copy link
Owner

sundy-li commented Aug 22, 2024

please use cargo fmt format the codes.

ut is failed now.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 17, 2024

/// By default, we use 2**14 registers like redis
const DEFAULT_P: usize = 14_usize;

/// Fixed seed
const SEED: RandomState = RandomState::with_seeds(
Copy link
Owner

Choose a reason for hiding this comment

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

Removing these will cause incompatiable changes.

We need to use fixed seed.

@LucaCappelletti94
Copy link
Contributor Author

I am not sure what died there.

@sundy-li
Copy link
Owner

It's done in #4 #6

@sundy-li sundy-li closed this Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants