-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-43444: [C++] Add benchmark for binary view builder #43445
GH-43444: [C++] Add benchmark for binary view builder #43445
Conversation
|
@@ -26,6 +26,7 @@ | |||
namespace arrow::util { | |||
|
|||
inline BinaryViewType::c_type ToInlineBinaryView(const void* data, int32_t size) { | |||
assert(size <= BinaryViewType::kInlineSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://godbolt.org/z/q8xjb8Ehe
From here, COMPILER ASSUMER might generate better code in C++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which I think we be assumed when this is inlined from the if
below.
@felipecrv Would you mind take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just nitpicks
return ToInlineBinaryView(data, size); | ||
} | ||
|
||
inline BinaryViewType::c_type ToLargeBinaryView(const void* data, int32_t size, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: call this ToNonInlineBinaryView
to not confuse people that might think a LARGE_BINARY_VIEW
type exists. [I misread it like this at first :)]
@@ -26,6 +26,7 @@ | |||
namespace arrow::util { | |||
|
|||
inline BinaryViewType::c_type ToInlineBinaryView(const void* data, int32_t size) { | |||
assert(size <= BinaryViewType::kInlineSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which I think we be assumed when this is inlined from the if
below.
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit c6be2df. There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. It also includes information about 29 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
Adding benchmark for BinaryViewBuilder
What changes are included in this PR?
Adding benchmark for BinaryViewBuilder
Are these changes tested?
No
Are there any user-facing changes?
No