perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation - #9117
Draft
gargiulofrancesco wants to merge 7 commits into
Draft
perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation#9117gargiulofrancesco wants to merge 7 commits into
gargiulofrancesco wants to merge 7 commits into
Conversation
Signed-off-by: Francesco Gargiulo <[email protected]>
Signed-off-by: Francesco Gargiulo <[email protected]>
Signed-off-by: Francesco Gargiulo <[email protected]>
Signed-off-by: Francesco Gargiulo <[email protected]>
Signed-off-by: Francesco Gargiulo <[email protected]>
Signed-off-by: Francesco Gargiulo <[email protected]>
develop added benchmarks/string-bench (#9060), which uses vortex_onpair::DEFAULT_DICT12_CONFIG. This branch removes that constant in favour of re-exporting upstream onpair's DEFAULT_CONFIG, which holds the same values (dict-12, threshold 0.15, seed 42), so string-bench is updated to the new name. No textual conflicts. Signed-off-by: Francesco Gargiulo <[email protected]>
Merging this PR will improve performance by 11.52%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
| }) | ||
| }; | ||
| // A benign race can only ever install another structurally safe value. | ||
| drop(self.dictionary.set(dictionary)); |
Contributor
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Contributor
Benchmarks: String Encoding 📖vortex / vortex-file-compressed / ms (0.978x ➖, 1↑ 0↓)
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
|
Contributor
Benchmarks: PolarSignals Profiling 📖Vortex (geomean): 1.019x ➖ datafusion / vortex-file-compressed / ns (1.019x ➖, 0↑ 0↓)
No file size changes detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rationale for this change
onpair0.2 allows to build aCompactDictionaryover caller-owned buffers, andvalidate_safety, which checks only the safety invariants rather than full semantic well-formedness. Adopting both makes OnPair file reads 1.25x faster.What changes are included in this PR?
onpair0.1.1 → 0.2.0.OnPairDatamemoizes aCompactDictionary<OnPairDictionaryStorage>over the existing Vortexbuffers (no copying), and validates it with
validate_safety.OnPair::try_new_with_dataletsOnPairScheme::compresscarry that cache through thechild-compression rebuild instead of discarding it.
DEFAULT_DICT12_CONFIGwith the re-exportedonpair::DEFAULT_CONFIG(identical values), and drops the redundant
OnPairData::len.string-benchvortexsuite, median of 3 interleaved runs, FSST as an untouched control:read(ms)clickbench/URL/shard-0onpair-12tpch/l_commentonpair-12clickbench/URL/shard-0fssttpch/l_commentfsstEncoded size is byte-identical; write times are unchanged.
What APIs are changed? Are there any user-facing changes?
None. The on-disk format is unchanged (golden tests pass unmodified), and
vortex-onpairis gatedbehind
unstable_encodingswithvortex-btrblocksas its only in-tree consumer. Within thatcrate,
OnPairData::newloses itslenparameter,OnPairData::len/is_emptyare removed, andOnPair::try_new_with_datais new.