Skip to content

refactor: pack and gather patches with explicit chunk widths - #9941

Draft
mhk197 wants to merge 1 commit into
mk/bitpacked-stack-02-cpu-layoutfrom
mk/bitpacked-stack-05-explicit-packing
Draft

mhk197 wants to merge 1 commit into
mk/bitpacked-stack-02-cpu-layoutfrom
mk/bitpacked-stack-05-explicit-packing

Conversation

@mhk197

@mhk197 mhk197 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Share packing and exception gathering between uniform and caller-supplied chunk layouts. The explicit encoder accepts independently chosen widths, including full-width and zero-width chunks, and persists only their byte boundaries in the offsets child. Global-width encoding entry points remain available.

Tests cover full-width chunks, exception gathering, zero-copy slicing with nonzero offset origins, and decoding the resulting layouts. This makes it possible for a later encoder to choose widths independently for each chunk.

Validation: 394 FastLanes/BtrBlocks tests passed (1 skipped).

@codspeed

codspeed Bot commented Sep 18, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 12.2%

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

⚡ 1 improved benchmark
✅ 221 untouched benchmarks
⏩ 2339 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
filtered_owned_i64_avx512[OneNullInEight] 25.9 µs 23.1 µs +12.2%

Tip

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


Comparing mk/bitpacked-stack-05-explicit-packing (82c7619) with mk/bitpacked-stack-02-cpu-layout (797717f)

Open in CodSpeed

Footnotes

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

@mhk197
mhk197 added this pull request to stack #9946 September 18, 2026 19:27
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-05-explicit-packing branch from e1be4ab to 120d3bd Compare September 18, 2026 19:42
@mhk197
mhk197 deployed to duckdb-build September 18, 2026 19:42 — with GitHub Actions Active
@mhk197
mhk197 deployed to duckdb-build September 18, 2026 19:42 — with GitHub Actions Active
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-05-explicit-packing branch from 120d3bd to b055b6b Compare September 22, 2026 15:06
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-05-explicit-packing branch from b055b6b to a90e6fe Compare September 23, 2026 17:31
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-05-explicit-packing branch from a90e6fe to 0e28beb Compare September 23, 2026 18:17
Base automatically changed from mk/bitpacked-stack-04-offset-child to mk/bitpacked-stack-02-cpu-layout September 23, 2026 18:17
@mhk197
mhk197 removed this pull request from stack #9946 September 23, 2026 18:19
@mhk197
mhk197 added this pull request to stack #10006 September 23, 2026 18:22
Signed-off-by: "Matt Katz" <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
@mhk197
mhk197 removed this pull request from stack #10006 September 23, 2026 19:43
@mhk197
mhk197 added this pull request to stack #10012 September 23, 2026 19:43
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-05-explicit-packing branch from 0e28beb to 82c7619 Compare September 23, 2026 19:43

This branch was successfully deployed

1 active (outdated) deployment
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