-
Notifications
You must be signed in to change notification settings - Fork 4
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
32-bit support for xxHash algorithm #2
Conversation
Can you perhaps add a handful of canonical test cases to |
xxh32.hpp
Outdated
|
||
struct xxh32 { | ||
static constexpr uint32_t hash( const char *p, uint32_t len, uint32_t seed ) { | ||
return finalize( (len >= 16 ? h32bytes(p, len, seed) : seed+P5) + len, p+(len & ~0xF), len & 0xF ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return finalize( (len >= 16 ? h32bytes(p, len, seed) : seed+P5) + len, p+(len & ~0xF), len & 0xF ); | |
return finalize( (len >= 16 ? h16bytes(p, len, seed) : seed+P5) + len, p+(len & ~0xF), len & 0xF ); |
As a matter of fact, I just tried to extend the tests in |
To be honest, it's been a long time since I wrote this and as far as I can remember, I didn't came into any problems when I used it. But anyway, I'll look at it soon and make any edits needed. |
I'm just noticing that shockingly this has been open for a year now... I'll try looking into it soon, but I can't promise when I'll get around to. |
6aabeb5
to
eaa58e4
Compare
Sorry for the force-push mess above, I initially committed with an old account name and wanted to get rid of it. I forgot about this pull request but finally took the necessary time to finish it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you very much!
Closes #1