Eliminate redundant decompressions in VarBinArray canonicalization#6692
Merged
Eliminate redundant decompressions in VarBinArray canonicalization#6692
Conversation
Signed-off-by: Baris Palaska <barispalaska@gmail.com>
Merging this PR will improve performance by 12.36%
Performance Changes
Comparing Footnotes
|
Contributor
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Contributor
Benchmarks: PolarSignals ProfilingSummary
Detailed Results Table
|
Contributor
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: FineWeb 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: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Contributor
Benchmarks: FineWeb S3Summary
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: Random AccessSummary
Detailed Results Table
|
Contributor
Benchmarks: CompressionSummary
Detailed Results Table
|
Contributor
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
AdamGS
approved these changes
Feb 26, 2026
Contributor
AdamGS
left a comment
There was a problem hiding this comment.
Benchmarks look good to me, improving random access is pretty rare which is awesome.
a10y
reviewed
Feb 27, 2026
Comment on lines
-25
to
-26
| let array = array.clone().zero_offsets(); | ||
| let (dtype, bytes, offsets, validity) = array.into_parts(); |
Contributor
There was a problem hiding this comment.
are we sure reverting this doesn't break #5962 ?
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.
varbin_to_canonicalis doing so many decompressionszero_offsets -> offset_at -> offset_atzero_offsets -> slice_bytes -> offset_at(0)zero_offsets -> slice_bytes -> offset_at(self.len)zero_offsets -> to_primitive()elseexecute::<PrimitiveArray>This PR reduces it down to 1 and simplifies the function.