Skip to content

Add chunk-wise BitPackedV2 compression with PatchesV2 - #9677

Draft
joseph-isaacs wants to merge 1 commit into
developfrom
ji/bitpacked-v2-patches
Draft

Add chunk-wise BitPackedV2 compression with PatchesV2#9677
joseph-isaacs wants to merge 1 commit into
developfrom
ji/bitpacked-v2-patches

Conversation

@joseph-isaacs

Copy link
Copy Markdown
Contributor

Summary

  • add FastLanes BitPackedV2 with a bit width per 1,024-value chunk
  • add PatchesV2 with chunk-local indices and compact slot metadata
  • use BitPackedV2 for unstable integer bitpacking and FoR residuals
  • compress the three patch children adaptively instead of leaving them uncompressed

This is the base of a two-PR stack. It intentionally excludes BlockedFoR, FloatQuantV2, and temporary benchmark/scatter experiments.

Validation

  • cargo +nightly fmt --all -- --check
  • cargo check -p vortex-btrblocks
  • cargo check -p vortex-btrblocks --features unstable_encodings
  • cargo test -p vortex-btrblocks --features unstable_encodings test_bitpacking_v2_compresses_attached_patches
  • stacked-tree targeted clippy: cargo clippy -p vortex-btrblocks -p vortex-bench --all-targets --features unstable_encodings -- -D warnings

Compression note

The prior combined branch reduced controlled TPC-H SF10 output from 2,455,096,884 to 2,416,147,124 bytes (-38,949,760, -1.5865%). That number is stack-level evidence, not an isolated claim for this PR; a clean branch-by-branch recompression should be used for final attribution.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@codspeed-hq

codspeed-hq Bot commented Aug 27, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 4 improved benchmarks
❌ 2 regressed benchmarks
✅ 2151 untouched benchmarks
⏩ 106 skipped benchmarks1
🗄️ 4 archived benchmarks run2

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime mul_i32_nonnull_avx512 7.2 µs 8.1 µs -10.29%
Simulation compress_fsst[(500, 64, 8)] 482.6 µs 537.8 µs -10.27%
WallTime arrow_checked_add_u32_neon[16384] 20.5 µs 13.5 µs +51.29%
WallTime arrow_checked_add_u32_avx2[16384] 21.3 µs 17.7 µs +20.37%
Simulation take[duplicates/repeated/primitive/nonnull/chunks=16/indices=1000] 234.2 µs 201.2 µs +16.37%
WallTime words_gather_scalar_avx2[65536] 9.4 µs 8.3 µs +13.63%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ji/bitpacked-v2-patches (f4d3659) with develop (68e2aee)

Open in CodSpeed

Footnotes

  1. 106 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.

  2. 4 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant