Skip to content

refactor: make bitpacked CPU kernels consume chunk layouts - #9938

Draft
mhk197 wants to merge 1 commit into
mk/bitpacked-stack-01-wire-boundaryfrom
mk/bitpacked-stack-02-cpu-layout
Draft

mhk197 wants to merge 1 commit into
mk/bitpacked-stack-01-wire-boundaryfrom
mk/bitpacked-stack-02-cpu-layout

Conversation

@mhk197

@mhk197 mhk197 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Introduce an operation-local chunk layout and route CPU decoding, scalar access, take, filter, comparisons, and FoR through it. Arrays and encoders still use one uniform width; this prepares the kernels to address independently packed chunks.

Part 2/9 of the bitpacked-v2 stack (532 added + removed lines). Merge in order; each draft targets the preceding branch, starting from develop.

123456789

Validation: All 5 focused plugin, serde, and chunk-layout tests passed on this commit, including the regression that rejects direct vtable serde. Changed Rust files were formatted with nightly; git diff --check passed.

@codspeed

codspeed Bot commented Sep 18, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ 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.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 1 regressed benchmark
✅ 2248 untouched benchmarks
⏩ 218 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation random_i16[0.8] 79.4 µs 97.8 µs -18.85%
WallTime arrow_checked_add_u32_neon[16384] 20.4 µs 12.3 µs +65.71%
Simulation random_i8[0.5] 96 µs 72.4 µs +32.52%
WallTime words_gather_scalar_avx2[65536] 9.4 µs 8.2 µs +13.66%
WallTime mul_u32_nonnull_avx512 6.3 µs 5.6 µs +11.51%

Tip

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


Comparing mk/bitpacked-stack-02-cpu-layout (7390ffe) with mk/bitpacked-stack-01-wire-boundary (950de57)2

Open in CodSpeed

Footnotes

  1. 218 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. No successful run was found on mk/bitpacked-stack-01-wire-boundary (9681199) during the generation of this report, so 79c6922 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Signed-off-by: "Matt Katz" <mhkatz97@gmail.com>
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-02-cpu-layout branch from 9737c00 to 7390ffe Compare September 18, 2026 19:42
@mhk197
mhk197 deployed to duckdb-build September 18, 2026 19:43 — with GitHub Actions Active
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