perf(parquet): slice up contiguous buffer for decimals and fsb#10364
Open
MassivePizza wants to merge 8 commits into
Open
perf(parquet): slice up contiguous buffer for decimals and fsb#10364MassivePizza wants to merge 8 commits into
MassivePizza wants to merge 8 commits into
Conversation
etseidl
reviewed
Jul 17, 2026
etseidl
reviewed
Jul 17, 2026
Jefffrey
reviewed
Jul 18, 2026
MassivePizza
force-pushed
the
parquet-contiguous-decimal
branch
from
July 20, 2026 13:43
50edfd3 to
f62743e
Compare
MassivePizza
marked this pull request as draft
July 20, 2026 16:06
This allows optimizations since iterators uphold invariants.
Revert this when MSRV is bumped to at least 1.93.
alamb
pushed a commit
that referenced
this pull request
Jul 20, 2026
# Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - Related to #10364 (review). # Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? If this PR claims a performance improvement, please include evidence such as benchmark results. --> # Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. -->
MassivePizza
marked this pull request as ready for review
July 22, 2026 16:01
Contributor
|
run benchmark arrow_writer |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing parquet-contiguous-decimal (0495502) to cd17899 (merge-base) diff File an issue against this benchmark runner |
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.
Which issue does this PR close?
N/A
Rationale for this change
Converting decimals and FixedLenByteArrays to individual allocs requires a lot of alloc+drop time and memory overhead.
What changes are included in this PR?
Allocate one big buffer, and cut it up into slices of
bytes::Bytes. This amortizes the alloc upfront, and effectively eliminates the drop overhead by turning a dealloc to an Arc decrement per slice.This still has moderate memory overhead.
Bytesis 32 bytes, while the slices usually expose less than 16 bytes at a time e.g. UUIDs or decimal128, but a lot more effort would be required to implement a (perhaps borrowed?) alternative that behaves likeFixedLenByteArray.There are a few other ideas worth exploring, primarily custom
ColumnValueEncoders that converts on the fly to avoid the temporary allocs all together.There is also a small outlining+inlining inExtracted to #10389.compare_greaterto help out in theget_min_maxloop.Are these changes tested?
Should be covered by existing tests. There are also new benches included (extracted to #10388):
decimal bench
fsb bench
Are there any user-facing changes?
No.