chore[btrblocks]: more precise FoR expected_compression_ratio#6301
Open
joseph-isaacs wants to merge 2 commits intodevelopfrom
Open
chore[btrblocks]: more precise FoR expected_compression_ratio#6301joseph-isaacs wants to merge 2 commits intodevelopfrom
FoR expected_compression_ratio#6301joseph-isaacs wants to merge 2 commits intodevelopfrom
Conversation
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Contributor
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Contributor
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Contributor
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: Random AccessSummary
|
a10y
approved these changes
Feb 4, 2026
Contributor
Benchmarks: CompressionSummary
Detailed Results Table
|
Merging this PR will degrade performance by 33.73%
Performance Changes
Comparing Footnotes
|
robert3005
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⏺ Here's the full picture:
Encoding Tree Diff Summary
The change eliminates 2,170 FoR wrappers where FoR doesn't reduce bit width
(e.g., l_partkey min=2 still needs 18 bits, l_suppkey min=1 still needs 14
bits). That part is correct.
But it introduces 185 new patches. The key example is the RunEnd ends column:
patches=None) — subtracting min=6 makes max=131066 fit in 17 bits
needs 18 bits, so value 131072 becomes a patch
The FoR estimation now considers these cases not worth it, but removing FoR
forces the bitpacked encoding to use patches for edge-case values. Patch
handling during decompression is the likely cause of the +46% decompress
regression.
The fix would be to make the FoR estimator account for cases where subtracting
the minimum reduces the bit width (i.e., where (max - min).ilog2() <
max.ilog2()). Those cases should still strongly prefer FoR.