Skip to content

Minor: reserve space for output views in ByteViewArrayDecoderDictionary #7338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Mar 26, 2025

Which issue does this PR close?

Rationale for this change

Reserving sufficient space before appending views potentially saves an allocation

What changes are included in this PR?

Reserve sufficient space for the views

Are there any user-facing changes?

Performance is if anything worse 🤔

++ critcmp main alamb_reserve_views
group                                                                          alamb_reserve_views                    main
-----                                                                          -------------------                    ----
arrow_array_reader/StringViewArray/dictionary encoded, mandatory, no NULLs     1.01    244.9±0.37µs        ? ?/sec    1.00   243.0±23.88µs        ? ?/sec
arrow_array_reader/StringViewArray/dictionary encoded, optional, half NULLs    1.21    265.1±4.33µs        ? ?/sec    1.00    219.4±1.12µs        ? ?/sec
arrow_array_reader/StringViewArray/dictionary encoded, optional, no NULLs      1.04    247.5±0.40µs        ? ?/sec    1.00    237.0±3.12µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, mandatory, no NULLs          1.00    388.2±1.69µs        ? ?/sec    1.04    402.1±1.19µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, optional, half NULLs         1.09    337.6±1.74µs        ? ?/sec    1.00    308.4±0.96µs        ? ?/sec
arrow_array_reader/StringViewArray/plain encoded, optional, no NULLs           1.00   397.0±21.83µs        ? ?/sec    1.03    408.9±1.35µs        ? ?/sec

@github-actions github-actions bot added the parquet Changes to the parquet crate label Mar 26, 2025
@alamb alamb force-pushed the alamb/reserve_views branch from d382a25 to db85f2d Compare March 26, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant