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

Introduce salt into row hash (#3528 part 2) #3533

Merged
merged 15 commits into from
Mar 13, 2023

Conversation

yoniko
Copy link
Contributor

@yoniko yoniko commented Mar 7, 2023

Part 2 of #3528

Adds hash salt that helps to avoid regressions where consecutive compressions use the same tag space with similar data (running zstd -b5e7 enwik8 -B128K reproduces this regression).

Note: based on #3528 and includes it, see only diffs introduced here by selecting only the changes from last commit, or by viewing yoniko#13

yoniko added 2 commits March 7, 2023 12:11
- Adds memory type that is guaranteed to have been initialized at least once in the workspace's lifetime.
- Changes tag space in row hash to be based on init once memory.
- Moves buffers to aligned memory and removes the buffer memory type.
@yoniko yoniko force-pushed the tag-space-hash-salting-3528-part2 branch from 0273206 to e18c951 Compare March 8, 2023 00:30
@yoniko yoniko linked an issue Mar 8, 2023 that may be closed by this pull request
@yoniko yoniko force-pushed the tag-space-hash-salting-3528-part2 branch from a8f72d2 to 029b84f Compare March 9, 2023 21:09
@yoniko
Copy link
Contributor Author

yoniko commented Mar 9, 2023

PR performance seems to be on PR with previous versions' performance for the samples I've tested.
See previous results here.

@yoniko
Copy link
Contributor Author

yoniko commented Mar 9, 2023

@Cyan4973 - I've added some more entropy to the salt, let me know what you think

yoniko added 3 commits March 9, 2023 13:52
This helps to avoid regressions where consecutive compressions use the same tag space with similar data (running `zstd -b5e7 enwik8 -B128K` reproduces this regression).
@yoniko yoniko force-pushed the tag-space-hash-salting-3528-part2 branch from d4dff59 to 93dcd83 Compare March 9, 2023 21:52
@yoniko yoniko force-pushed the tag-space-hash-salting-3528-part2 branch from 93dcd83 to 2543295 Compare March 10, 2023 07:05
yoniko added 5 commits March 13, 2023 10:21
- Adds memory type that is guaranteed to have been initialized at least once in the workspace's lifetime.
- Changes tag space in row hash to be based on init once memory.
- Moves buffers to aligned memory and removes the buffer memory type.
@yoniko yoniko force-pushed the tag-space-hash-salting-3528-part2 branch from 8f2280c to a8c62ff Compare March 13, 2023 18:08
@yoniko
Copy link
Contributor Author

yoniko commented Mar 13, 2023

@Cyan4973 - is there any other change you'll like to see here?
If not, I'll merge.

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

Successfully merging this pull request may close these issues.

Row hash tag space initialization speed regression
3 participants