Skip to content
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

coldataext: remove an allocation in production builds for arrays #95400

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

yuzefovich
Copy link
Member

This commit makes it so that we only perform assertions in the datum vec in the test builds. In particular, this allows us to remove an allocation for each array object being set (which happens in tree.DArray.ResolvedType where we construct an array type on demand). I was just looking at a heap profile where this allocation accounted for 7% of all allocations.

Epic: None

Release note: None

This commit makes it so that we only perform assertions in the datum vec
in the test builds. In particular, this allows us to remove an
allocation for each array object being set (which happens in
`tree.DArray.ResolvedType` where we construct an array type on demand).
I was just looking at a heap profile where this allocation accounted for
7% of all allocations.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)

@DrewKimball
Copy link
Collaborator

Are there any existing benchmarks that would show this improvement?

@yuzefovich
Copy link
Member Author

Are there any existing benchmarks that would show this improvement?

I don't think so (at least a quick search didn't turn up anything that uses ARRAYs or tuples).

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 18, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants