-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use new paramSwitch enum for row matchfinder and block splitter #2788
Conversation
ef95f6c
to
208c114
Compare
I believe that's nonetheless a good way forward, and likely a better situation than the one we are currently in. The way I see it, we could employ this strategy :
|
Yeah, if we need this functionality, we can just add a new parameter like |
I did not mention it earlier, but just as a confirmation :
Yes, we should. It will be much cleaner. |
208c114
to
4e4ad30
Compare
@@ -236,17 +236,17 @@ silesia, level 1, advanced | |||
silesia, level 3, advanced one pass, 4849553 | |||
silesia, level 4, advanced one pass, 4786968 | |||
silesia, level 5 row 1, advanced one pass, 4640752 | |||
silesia, level 5 row 2, advanced one pass, 4638961 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces a lot of insignificant changes (which is fine). Can you point out exactly which lines introduce functional changes?
Even better would be to separate into two commits (or two PRs). One to switch to ZSTD_ParamSwitch_e
, and one to make the functional change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there should only be insignificant changes and no real functional changes - these changes appear to be a bug where I missed one of the params in regressiontest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out I introduced a bug where I was incorrectly passing in the value of the useRowMatchFinder
param into the function resolveBlockSplitterMode
, causing block splitter to always get enabled when row hash is. Perils of copy-paste..
I split this PR into two commits, one for ldm, since it's a bit different, and one for the rest. Basically there are no real changes, and every change that isn't a direct name replacement is a small adjustment in order to accommodate the naming change or int->enum changes. All the results.csv
changes are just switching between 1 and 2 in row match finder, since the meaning of 1 and 2 changed for rowhash's enum. Lmk if there's is a better scheme to divide this up for the sake of making review easier.
acb3905
to
716926d
Compare
716926d
to
06f42c3
Compare
This PR introduces a minor refactor that adds a new param that generalizes the idea of a boolean parameter that can be user-enabled, user-disabled, or determined at runtime by the library what the value should be.
The two discussion points are:
Should the unstable
ZSTD_literalCompressionMode_e
get moved to this as well, with the associated advanced param renamed toZSTD_c_useLiteralCompression
(like*_useRowMatchFinder
and*_useBlockSplitter
)?LDM falls into this category, but the advanced parameter
ZSTD_c_enableLongDistanceMatching
is already stable, and therefore the type can't be changed to the new enum type. Internally, we could still implement the selection logic as the new enum type, but then the advanced param and the internals would diverge, unlike any of the otherparamSwitch
-type features.Note: #2780 will be rebased on top of this