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

Mismatch between a line of code and its comment #9

Closed
moien007 opened this issue Feb 16, 2020 · 2 comments
Closed

Mismatch between a line of code and its comment #9

moien007 opened this issue Feb 16, 2020 · 2 comments

Comments

@moien007
Copy link
Contributor

Hi,

I'm concerned about this line of code and its comment,

h64 = BitUtils.RotateLeft(h64, 23) * p2 + p3; // (rotl 27) * p2 + p3

Where 23 != 27.

Which value is the right one to choose to be compatible with other implementations?

@uranium62
Copy link
Owner

The comment is incorrect (typo). It should be

h64 = BitUtils.RotateLeft(h64, 23) * p2 + p3; // (rotl 23) * p2 + p3 

But the implementation is correct
https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h#L1618

@uranium62
Copy link
Owner

I fixed it

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

2 participants