Skip to content

perf: fuse bitpacked chunk encoding - #9944

Draft
mhk197 wants to merge 1 commit into
mk/bitpacked-stack-07-width-selectionfrom
mk/bitpacked-stack-08-fused-encoder
Draft

mhk197 wants to merge 1 commit into
mk/bitpacked-stack-07-width-selectionfrom
mk/bitpacked-stack-08-fused-encoder

Conversation

@mhk197

@mhk197 mhk197 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fuse histogramming, width selection, exception gathering, and packing while each chunk is in cache. Convert the temporary width choices into the offsets child once packing is complete.

Retain the multipass implementation as a test oracle and verify identical layouts, packed bytes, exceptions, and decoded values. Include a short trailing chunk whose padded packed size exceeds its raw size.

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

@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.

⚠️ 3 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

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

⚡ 3 improved benchmarks
❌ 1 regressed benchmark
✅ 2228 untouched benchmarks
⏩ 329 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation take_fsl_u8_random[256, 100] 45.8 µs 98.6 µs -53.53%
Simulation take_fsl_f16_random[256, 100] 141.1 µs 85.4 µs +65.33%
Simulation take_chunked_fsl_sorted[32, 64] 252.3 µs 195.8 µs +28.84%
Simulation take_fsl_random[64, 100] 143.8 µs 124.9 µs +15.15%
⚠️ Simulation fixed_16_advancing_ptr_safe[100] < 1 ns < 1 ns N/A
⚠️ Simulation preverify_advancing_ptr_unchecked[1000] < 1 ns < 1 ns N/A
⚠️ Simulation preverify_advancing_ptr_unchecked[10000] < 1 ns < 1 ns N/A

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-08-fused-encoder (ab1d8e1) with mk/bitpacked-stack-07-width-selection (d5ffca3)

Open in CodSpeed

Footnotes

  1. 329 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-08-fused-encoder branch from d40e0fd to 910328c Compare September 18, 2026 19:42
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-08-fused-encoder branch from 910328c to f2104c5 Compare September 22, 2026 15:06
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-08-fused-encoder branch from f2104c5 to 5fc8320 Compare September 23, 2026 17:31
@mhk197
mhk197 force-pushed the mk/bitpacked-stack-08-fused-encoder branch from 5fc8320 to 34b2162 Compare 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-08-fused-encoder branch from 34b2162 to ab1d8e1 Compare September 23, 2026 19:43

This branch was successfully deployed

No deployments
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