Common/Hash: use zlib-ng for adler32. small cleanups. #10903
Merged
+173
−235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
For "larger" buffer sizes, like those used by
CompressedBlobReader, I've seen it be up to 20x faster (smaller buffers are generally faster as well, but not by as large a margin). Admittedly it's still a really small amount of wall clock time either way.edit: actaully looking more, this seems to be a large speedup for
CompressedBlobReaderuse cases that read larger chunks. Haven't measured exactly, but the adler32 call for netplay's 8MiB chunks goes from taking 12-13% of total time, to < 1% of it (zlib-ng has chosenadler32_avx2on my system, fwiw)