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

document requirements for InsertHash #18

Open
RaduBerinde opened this issue Mar 21, 2019 · 2 comments
Open

document requirements for InsertHash #18

RaduBerinde opened this issue Mar 21, 2019 · 2 comments
Assignees
Milestone

Comments

@RaduBerinde
Copy link
Contributor

It would be good to provide some documentation about what properties are expected of the input hash for InsertHash. For example, a reasonable question is: if my data is a set of 64-bit ints, can I use them directly as the "hash"? I ran some experiments with that and got bad results. I also got bad results when I used a simplistic hash function (xor and multiply by large prime). Does it require good avalanche characteristics?

@seiflotfy
Copy link
Member

the hash should uniform across the 64 bit spectrum if you limit it to a range of [0-n] you are guaranteeing that some registers will never be set... I will write some examples and put that into the documentation. WDYT @RaduBerinde

@RaduBerinde
Copy link
Contributor Author

Sounds great, thanks! Yeah, after typing up this issue I looked more into HLL and realized it assumes uniformity. I think it's an important point because some hash functions focus only on low collisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants