[RFC] Add internal API for converting ZSTD_Sequence into seqStore #2715
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.
Suggestion cannot be applied right now. Please check back later.
Actually, it turns out this functionality already exists, but we just add a small wrapper around it to provide a clean interface.
Currently, on
silesia.tar
with sequences generated from compression level 3 and ZSTD_generateSequences(),ZSTD_convertBlockSequencesToSeqStore
runs at around 2100MB/s averaged across all blocks. Most of this time seems to be spent inZSTD_finalizeOffCode()
.More importantly though, I'll specify a general set of guidelines for dealing with hardware accelerated matchfinders and how they should be integrated into the library at a per-block level, and suggestions are welcome here.
Generally, a hardware-accelerated matchfinder must adhere to the below function signature, storing its result in an array of
ZSTD_Sequence
.The reasoning being that then down the line, we can then define the following function that could potentially select between multiple accelerated matchfinders:
And finally, the code could be integrated like something along these lines, in
ZSTD_compressBlock_internal()
(and of course, a first implementation can hard-code a lot of these dynamic decisions for the purposes of testing).