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

Speed up checked kernels for non-null data (~1.4-5x faster) #2749

Merged
merged 3 commits into from Sep 17, 2022

Conversation

Dandandan
Copy link
Contributor

@Dandandan Dandandan commented Sep 16, 2022

Which issue does this PR close?

Closes #2747

Rationale for this change

We can use some more optimized ways to generate new arrays from fallible iterators:
(There is an overflow in the benchmark).

add_checked(0)          time:   [14.555 µs 14.574 µs 14.596 µs]
                        change: [-79.379% -79.172% -78.968%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe

Benchmarking subtract_checked(0): Collecting 100 samples in estimated 5.0209 s (subtract_checked(0)     time:   [15.246 µs 15.265 µs 15.285 µs]
                        change: [-82.424% -81.720% -81.002%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
  2 (2.00%) high severe

Benchmarking multiply_checked(0): Collecting 100 samples in estimated 5.0334 s (multiply_checked(0)     time:   [14.364 µs 14.381 µs 14.399 µs]
                        change: [-80.759% -80.340% -79.944%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) low mild
  4 (4.00%) high mild
  4 (4.00%) high severe

Benchmarking divide_checked(0): Collecting 100 samples in estimated 5.2102 s (96divide_checked(0)       time:   [54.127 µs 54.173 µs 54.223 µs]
                        change: [-29.294% -29.093% -28.909%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

What changes are included in this PR?

Are there any user-facing changes?

@Dandandan Dandandan changed the title Speed up checked kernels Speed up checked kernels Sep 16, 2022
@Dandandan Dandandan changed the title Speed up checked kernels Speed up checked kernels (1.4 - 7x) Sep 16, 2022
@Dandandan Dandandan marked this pull request as draft September 16, 2022 16:50
@Dandandan
Copy link
Contributor Author

Ah wait - this changes the semantics slightly as the overflow check probably isn't meant to work on null-values...
Requires some more thought.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 16, 2022
@Dandandan Dandandan marked this pull request as ready for review September 16, 2022 19:51
@Dandandan Dandandan changed the title Speed up checked kernels (1.4 - 7x) Speed up checked kernels for non-null data (1.4-5x faster) Sep 16, 2022
@Dandandan Dandandan changed the title Speed up checked kernels for non-null data (1.4-5x faster) Speed up checked kernels for non-null data (~1.4-5x faster) Sep 16, 2022
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Makes sense, no point zero allocating if you don't need to 👍

@Dandandan Dandandan merged commit 46fcb0c into apache:master Sep 17, 2022
@ursabot
Copy link

ursabot commented Sep 17, 2022

Benchmark runs are scheduled for baseline = ca00b67 and contender = 46fcb0c. 46fcb0c is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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

Successfully merging this pull request may close these issues.

Improve performance of checked kernels on non-null data
4 participants