-
Notifications
You must be signed in to change notification settings - Fork 757
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
rolling window xxhash #193
Comments
No, xxhash is not a rolling hash. |
thanks for your explanation! I guess I have to look for other rolling hashes. |
@Cyan4973 Being also in search of a very fast rolling hash function, here's a follow-up question: Would it be possible for you to shortly outline, or link to, techniques that make xxHash fast and well-distributed, that could still apply to rolling hashes? It would be fantastic to be able to craft a rolling hash, e.g. for |
The rolling hashes I know of are fundamentally different from xxhash, or any other high quality hash. |
You are thinking too narrow, @Cyan4973. XXH3 is definitely capable of being a rolling hash. Just not in the traditional sense. Every aligned 1024 bytes (one block, given the default secret size) can be pushed or popped. This requires all 8 accumulators, but it is definitely doable. |
Well, that's true. A KB-level granularity seems indeed possible with XXH3, Also, it's not exactly as straightforward as a regular rolling hash, |
Hi,
Does xxhash support rolling window based hashing? For example, assume we use a fixed-size rolling window of 48 bytes. We first calculate an xxhash for the first 48 bytes (0-47 bytes). Then, is it possible to calculate the next rolling window from offset of 1-48, by subtracting the impact from the 0th byte and add the 48th byte, without calculate an xxhash from scratch?
The text was updated successfully, but these errors were encountered: