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

MINOR: [C++] Slight improvement for ArrayData device_type #41814

Merged
merged 1 commit into from
May 28, 2024

Conversation

zeroshade
Copy link
Member

@zeroshade zeroshade commented May 24, 2024

Responding to feedback on #40807:

          This condition implies that, conversely, in non-debug mode we could immediately return when we encounter a buffer? Instead of continue looping on all buffers and children...

Originally posted in #40807 (comment)

@zeroshade zeroshade requested a review from pitrou May 24, 2024 16:20
if (type == 0) {
type = static_cast<int>(buf->device_type());
} else {
DCHECK_EQ(type, static_cast<int>(buf->device_type()));
}
#endif
}

for (const auto& child : child_data) {
if (!child) continue;
Copy link
Member

Choose a reason for hiding this comment

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

Note that, unlike buffers, this should not happen.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@pitrou
Copy link
Member

pitrou commented May 28, 2024

FTR, I removed my handle from the PR description, as I don't want to receive notification spam when people merge commits in their Arrow fork :-)

@zeroshade zeroshade merged commit 235608b into apache:main May 28, 2024
39 of 41 checks passed
@zeroshade zeroshade removed the awaiting committer review Awaiting committer review label May 28, 2024
@zeroshade zeroshade deleted the minor-device-type branch May 28, 2024 23:23
Copy link

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 235608b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 68 possible false positives for unstable benchmarks that are known to sometimes produce them.

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

Successfully merging this pull request may close these issues.

2 participants