-
Notifications
You must be signed in to change notification settings - Fork 1k
bench: create zip kernel benchmarks
#8654
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
Conversation
alamb
left a comment
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.
Thanks @rluvaton
I did a quick profile on this benchmark and confirmed that zip was indeed taking most of the time, as expected
| /// filling it with random bytes with lengths in the specified range, | ||
| /// all starting with the provided `prefix`, generated using the provided `seed`. | ||
| /// | ||
| pub fn create_binary_array_with_len_range_and_prefix_and_seed<Offset: OffsetSizeTrait>( |
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.
The maze of these functions is becoming bewildering. Maybe it is time (not in this PR) to make some sort of builder API or something
| ) -> GenericBinaryArray<Offset> { | ||
| let rng = &mut seedable_rng(); | ||
| let range_rng = &mut seedable_rng(); | ||
| create_binary_array_with_seed( |
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.
This is a behavior change, right (now it uses a fixed seed).
But that is an improvement as it now matches the doc comment
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.
not a behavioral change as it used the same seed
Waiting for the PRs below to be merged first: - [x] #8654 - zip benchmarks **This PR include the following other PRs (unless merged)** to make the review easier, so please make sure to review them first - [x] #8658 - extracted from this - [x] #8656 - extracted from this # Which issue does this PR close? N/A # Rationale for this change Making zip really fast for scalars This is useful for `IF <expr> THEN <literal> ELSE <literal> END` # What changes are included in this PR? Created couple of implementation for zipping scalar, for primitive, bytes and fallback # Are these changes tested? existing tests # Are there any user-facing changes? new struct `ScalarZipper` TODO: - [x] Need to add comments if missing - [x] Add tests for decimal and timestamp to make sure the type is kept --------- Co-authored-by: Andrew Lamb <[email protected]>
Which issue does this PR close?
N/A
Rationale for this change
I have a PR to improve zip perf for scalar but I don't see any benchmarks for it:
What changes are included in this PR?
created zip benchmarks for scalar and non scalar with different masks
Are these changes tested?
N/A
Are there any user-facing changes?
Nope