perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation - #9117
perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation#9117gargiulofrancesco wants to merge 7 commits into
Conversation
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
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 <gargiulo.fr@gmail.com>
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)); |
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: String Encoding 📖vortex / vortex-file-compressed / ms (0.978x ➖, 1↑ 0↓)
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
|
Benchmarks: PolarSignals Profiling 📖Vortex (geomean): 1.019x ➖ datafusion / vortex-file-compressed / ns (1.019x ➖, 0↑ 0↓)
No file size changes detected. |
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.