pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/vortex-data/vortex/pull/9117

ull-requests-be6017ec12798e73.css" /> perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation by gargiulofrancesco · Pull Request #9117 · vortex-data/vortex · GitHub
Skip to content

perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation - #9117

Draft
gargiulofrancesco wants to merge 7 commits into
developfrom
fg/onpair-improvements
Draft

perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation#9117
gargiulofrancesco wants to merge 7 commits into
developfrom
fg/onpair-improvements

Conversation

@gargiulofrancesco

Copy link
Copy Markdown
Contributor

Rationale for this change

onpair 0.2 allows to build a CompactDictionary over caller-owned buffers, and validate_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?

  • Bump onpair 0.1.1 → 0.2.0.
  • OnPairData memoizes a CompactDictionary<OnPairDictionaryStorage> over the existing Vortex
    buffers (no copying), and validates it with validate_safety.
  • New OnPair::try_new_with_data lets OnPairScheme::compress carry that cache through the
    child-compression rebuild instead of discarding it.
  • Replaces the local DEFAULT_DICT12_CONFIG with the re-exported onpair::DEFAULT_CONFIG
    (identical values), and drops the redundant OnPairData::len.

string-bench vortex suite, median of 3 interleaved runs, FSST as an untouched control:

read (ms) develop this PR Change
clickbench/URL/shard-0 onpair-12 12.95 10.36 −20.0%
tpch/l_comment onpair-12 32.96 26.29 −20.2%
clickbench/URL/shard-0 fsst 17.41 17.35 −0.3%
tpch/l_comment fsst 26.63 26.32 −1.2%

Encoded 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-onpair is gated
behind unstable_encodings with vortex-btrblocks as its only in-tree consumer. Within that
crate, OnPairData::new loses its len parameter, OnPairData::len / is_empty are removed, and
OnPair::try_new_with_data is new.

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]>
@gargiulofrancesco gargiulofrancesco added action/benchmark Trigger full benchmarks to run on this PR changelog/performance A performance improvement labels Jul 31, 2026
@github-actions github-actions Bot removed the action/benchmark Trigger full benchmarks to run on this PR label Jul 31, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 11.52%

⚡ 1 improved benchmark
✅ 1841 untouched benchmarks
⏩ 55 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation fsl_large 95.6 µs 85.7 µs +11.52%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fg/onpair-improvements (e5976d2) with develop (49f98c3)

Open in CodSpeed

Footnotes

  1. 55 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

})
};
// A benign race can only ever install another structurally safe value.
drop(self.dictionary.set(dictionary));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Polar Signals Profiling Results

Latest Run

Status Commit Job Attempt Link
🟢 Done e5976d2 clickbench-nvme 1 Explore Profiling Data
🟢 Done e5976d2 tpcds-nvme 1 Explore Profiling Data
🟢 Done e5976d2 polarsignals 1 Explore Profiling Data
🟢 Done e5976d2 appian-nvme 1 Explore Profiling Data
🟢 Done e5976d2 random-access-bench 1 Explore Profiling Data
🟢 Done e5976d2 compress-bench 1 Explore Profiling Data
🟢 Done e5976d2 string-bench 1 Explore Profiling Data

Powered by Polar Signals Cloud

@gargiulofrancesco gargiulofrancesco changed the title feat(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Benchmarks: String Encoding 📖


vortex / vortex-file-compressed / ms (0.978x ➖, 1↑ 0↓)
name PR e5976d2 (ms) base 49f98c3 (ms) ratio (PR/base)
read/clickbench/URL/shard-0/fsst 48.063255 47.807061 1.01
read/clickbench/URL/shard-0/onpair-12 🚀 36.264947 41.025459 0.88
read/tpch/l_comment/fsst 95.483612 94.661174 1.01
read/tpch/l_comment/onpair-12 107.29475 115.047319 0.93
write/clickbench/URL/shard-0/fsst 914.051753 916.917481 1.00
write/clickbench/URL/shard-0/onpair-12 2112.43996 2093.29733 1.01
write/tpch/l_comment/fsst 3420.19733 3433.52461 1.00
write/tpch/l_comment/onpair-12 3935.12979 3943.18082 1.00
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
name PR e5976d2 (%) base 49f98c3 (%) ratio (PR/base)
size/clickbench/URL/shard-0/fsst 47.4688631 47.4688631 1.00
size/clickbench/URL/shard-0/onpair-12 29.7509552 29.7509552 1.00
size/tpch/l_comment/fsst 30.5060886 30.5060886 1.00
size/tpch/l_comment/onpair-12 23.2389905 23.2389905 1.00

@github-actions

Copy link
Copy Markdown
Contributor

Benchmarks: PolarSignals Profiling 📖

Vortex (geomean): 1.019x ➖


datafusion / vortex-file-compressed / ns (1.019x ➖, 0↑ 0↓)
name PR e5976d2 (ns) base 49f98c3 (ns) ratio (PR/base)
polarsignals_q00/datafusion:vortex-file-compressed 139427272 137552126 1.01
polarsignals_q01/datafusion:vortex-file-compressed 168454758 168077819 1.00
polarsignals_q02/datafusion:vortex-file-compressed 26774281 26097589 1.03
polarsignals_q03/datafusion:vortex-file-compressed 171494947 169847327 1.01
polarsignals_q04/datafusion:vortex-file-compressed 13038544 12589973 1.04
polarsignals_q05/datafusion:vortex-file-compressed 20458981 19540290 1.05
polarsignals_q06/datafusion:vortex-file-compressed 25761713 26632040 0.97
polarsignals_q07/datafusion:vortex-file-compressed 19541454 18510531 1.06
polarsignals_q08/datafusion:vortex-file-compressed 277841336 278336670 1.00
polarsignals_q09/datafusion:vortex-file-compressed 12791523 12336877 1.04

No file size changes detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy