Skip to content

perf: Tweak vec capacity in project_statistics#21734

Merged
Dandandan merged 1 commit intoapache:mainfrom
neilconway:neilc/perf-planner-proj-stats
Apr 19, 2026
Merged

perf: Tweak vec capacity in project_statistics#21734
Dandandan merged 1 commit intoapache:mainfrom
neilconway:neilc/perf-planner-proj-stats

Conversation

@neilconway
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A

Rationale for this change

We can easily specify the correct capacity for the result vector in project_statistics. Profiling shows that this reduces total allocated bytes for planning TPC-H Q13 by ~1.7%, or ~17 kB out of ~1.03MB of allocations.

Probably too small to show up in a measurement of elapsed duration, but doesn't hurt.

What changes are included in this PR?

  • Specify vector capacity in project_statistics

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the physical-expr Changes to the physical-expr crates label Apr 19, 2026
@Dandandan Dandandan added this pull request to the merge queue Apr 19, 2026
Merged via the queue into apache:main with commit 03ca0aa Apr 19, 2026
57 of 58 checks passed
@neilconway neilconway deleted the neilc/perf-planner-proj-stats branch April 20, 2026 13:05
Rich-T-kid pushed a commit to Rich-T-kid/datafusion that referenced this pull request Apr 21, 2026
## Which issue does this PR close?

N/A

## Rationale for this change

We can easily specify the correct capacity for the result vector in
`project_statistics`. Profiling shows that this reduces total allocated
bytes for planning TPC-H Q13 by ~1.7%, or ~17 kB out of ~1.03MB of
allocations.

Probably too small to show up in a measurement of elapsed duration, but
doesn't hurt.

## What changes are included in this PR?

* Specify vector capacity in `project_statistics`

## Are these changes tested?

Yes.

## Are there any user-facing changes?

No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants