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

simplify the hash API, call the hash function naturally #78

Open
rurban opened this issue Nov 11, 2019 · 0 comments
Open

simplify the hash API, call the hash function naturally #78

rurban opened this issue Nov 11, 2019 · 0 comments

Comments

@rurban
Copy link
Owner

rurban commented Nov 11, 2019

Call the hash function naturally
e.g. 32bit: uint32_t hash(const char* key, int len, uint32_t seed);
or 64bit: uint64_t hash(const char* key, int len, uint64_t seed);

Add pfhash templates for 32bit, 64bit (skip 128bit? not really needed).
Add \_test functions only for those with a different signature: e.g. seed as first PMurHash32(MH_UINT32 seed, const void *key, int len);

So one doesn't have to provide unnatural API's just to get an smhasher advantage.

Maybe provide hash classes for all functions, seperated into bitsize, seedsize, with optional init (clhash), and converter (seed first, ...)

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

1 participant