You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/16 16:32:56 UTC
[GitHub] [arrow-rs] Dandandan opened a new pull request, #2749: Speed up checked kernels
Dandandan opened a new pull request, #2749:
URL: https://github.com/apache/arrow-rs/pull/2749
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #2747
# Rationale for this change
We can use some more optimized ways to generate new arrays from fallible iterators:
```
Compiling arrow v22.0.0 (/home/danielheres/Code/gdd/arrow-rs/arrow)
Finished bench [optimized] target(s) in 36.09s
Running benches/arithmetic_kernels.rs (target/release/deps/arithmetic_kernels-229709035151921f)
Benchmarking add_checked(0): Collecting 100 samples in estimated 5.0265 s (303k add_checked(0) time: [16.434 µs 16.460 µs 16.492 µs]
change: [-77.419% -77.335% -77.246%] (p = 0.00 < 0.05)
Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
Benchmarking subtract_checked(0): Collecting 100 samples in estimated 5.0493 s (subtract_checked(0) time: [17.017 µs 17.042 µs 17.075 µs]
change: [-75.937% -75.895% -75.852%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) low mild
1 (1.00%) high mild
1 (1.00%) high severe
Benchmarking multiply_checked(0): Collecting 100 samples in estimated 5.0661 s (multiply_checked(0) time: [16.516 µs 16.608 µs 16.718 µs]
change: [-76.421% -76.337% -76.236%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
Benchmarking divide_checked(0): Collecting 100 samples in estimated 5.2259 s (91divide_checked(0) time: [56.541 µs 56.609 µs 56.683 µs]
change: [-29.205% -28.999% -28.802%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
Benchmarking add_checked(0.1): Collecting 100 samples in estimated 5.0341 s (288add_checked(0.1) time: [17.455 µs 17.468 µs 17.481 µs]
change: [-87.450% -87.433% -87.415%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severe
Benchmarking subtract_checked(0.1): Collecting 100 samples in estimated 5.0071 ssubtract_checked(0.1) time: [17.400 µs 17.409 µs 17.419 µs]
change: [-87.585% -87.569% -87.555%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
2 (2.00%) low severe
3 (3.00%) low mild
2 (2.00%) high mild
Benchmarking multiply_checked(0.1): Collecting 100 samples in estimated 5.0168 smultiply_checked(0.1) time: [17.373 µs 17.381 µs 17.390 µs]
change: [-87.597% -87.584% -87.571%] (p = 0.00 < 0.05)
Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) low mild
3 (3.00%) high mild
1 (1.00%) high severe
```
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please add the `breaking change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] Dandandan merged pull request #2749: Speed up checked kernels for non-null data (~1.4-5x faster)
Posted by GitBox <gi...@apache.org>.
Dandandan merged PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] ursabot commented on pull request #2749: Speed up checked kernels for non-null data (~1.4-5x faster)
Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749#issuecomment-1249992967
Benchmark runs are scheduled for baseline = ca00b671500b693f8c5e07ac4ea600269adfa2b6 and contender = 46fcb0c93c7b6e2067ff6a5b5bc0b0108ca3c2ae. 46fcb0c93c7b6e2067ff6a5b5bc0b0108ca3c2ae is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/0b53410e9e074d1e826d5de5de6216b7...f758ade39df34e5ea04934467a2fd4b9/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/e049ef882d1d448fb6ef56a9f19ac014...5956986cb07c46358bf0b4ebf75bb886/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/1d173a7a501c4c2b8eeaa8c1ca527f7f...2f76ae0f9f4c4b0e84feebee5129a836/)
[Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/727c890af66a4f47b510b0a520c3eed5...f0df76a21407424cb5ecf0787b2902ce/)
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] viirya commented on a diff in pull request #2749: Speed up checked kernels (1.4 - 7x)
Posted by GitBox <gi...@apache.org>.
viirya commented on code in PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749#discussion_r973207615
##########
arrow/src/compute/kernels/arity.rs:
##########
@@ -292,19 +292,16 @@ where
.map(|x| len - x.count_set_bits())
.unwrap_or_default();
- let mut buffer = BufferBuilder::<O::Native>::new(len);
- buffer.append_n_zeroed(len);
- let slice = buffer.as_slice_mut();
+ let values = a.values().iter().zip(b.values()).map(|(l, r)| op(*l, *r));
- try_for_each_valid_idx(len, 0, null_count, null_buffer.as_deref(), |idx| {
Review Comment:
`try_unary` also uses `try_for_each_valid_idx`, same trick also applies there?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] Dandandan commented on a diff in pull request #2749: Speed up checked kernels (1.4 - 7x)
Posted by GitBox <gi...@apache.org>.
Dandandan commented on code in PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749#discussion_r973340473
##########
arrow/src/compute/kernels/arity.rs:
##########
@@ -292,19 +292,16 @@ where
.map(|x| len - x.count_set_bits())
.unwrap_or_default();
- let mut buffer = BufferBuilder::<O::Native>::new(len);
- buffer.append_n_zeroed(len);
- let slice = buffer.as_slice_mut();
+ let values = a.values().iter().zip(b.values()).map(|(l, r)| op(*l, *r));
- try_for_each_valid_idx(len, 0, null_count, null_buffer.as_deref(), |idx| {
Review Comment:
Yes - applied it there too, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] Dandandan commented on pull request #2749: Speed up checked kernels (1.4 - 7x)
Posted by GitBox <gi...@apache.org>.
Dandandan commented on PR #2749:
URL: https://github.com/apache/arrow-rs/pull/2749#issuecomment-1249580017
Ah wait - this changes the semantics slightly as the overflow check probably isn't meant to work on null-values...
Requires some more thought.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org