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/07/15 12:07:51 UTC

[GitHub] [arrow-rs] jhorstmann opened a new pull request, #2077: Improve performance of set_bits by using copy_from_slice instead of setting individual bytes

jhorstmann opened a new pull request, #2077:
URL: https://github.com/apache/arrow-rs/pull/2077

   # 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 #2060.
   
   # Rationale for this change
    
   Using `copy_from_slice` here reduces the number of bounds checks to one per chunk instead of one per byte.
   
   Performance of `boolean_append_packed` improves by about 40% on my laptop.
   
   ```
   $ RUSTFLAGS="-Ctarget-cpu=skylake" perf record cargo bench --bench boolean_append_packed
   boolean_append_packed   time:   [11.634 us 11.712 us 11.802 us]                                   
                           change: [-41.447% -40.956% -40.476%] (p = 0.00 < 0.05)
                           Performance has improved.
   ```
   
   Further improvements should be possible by asserting the bounds once on function entry and then using unsafe `ptr::copy_non_overlapping` in the main loop and `get_bit_raw`/`set_bit_raw` for the non-aligned parts.
   
   # 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?
   
   No


-- 
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 #2077: Improve performance of set_bits by using copy_from_slice instead of setting individual bytes

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2077:
URL: https://github.com/apache/arrow-rs/pull/2077#issuecomment-1185640256

   Benchmark runs are scheduled for baseline = 86543a4b835f898308bd28a33d0da9d2ea7a9b35 and contender = 474dc14b2e80062c18b98a8667d4d878afb8249a. 474dc14b2e80062c18b98a8667d4d878afb8249a 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/114fb05936594b87be53ecb26e56b40d...c1a8d6bd7a434316a850384ded7b2b54/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/ddbc9a3c58dd4e8facf17cee0b181c8a...41dcd8feec7044029991a4249ea25fb0/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/01163ed4f7d84890a16973507a1b3690...524b8c7dc2614b3292399a5c1393b292/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/60147702a7364940a77147be71c3c5e9...c716c6a2d0fa41f191efbe13a98d01d1/)
   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] jhorstmann commented on pull request #2077: Improve performance of set_bits by using copy_from_slice instead of setting individual bytes

Posted by GitBox <gi...@apache.org>.
jhorstmann commented on PR #2077:
URL: https://github.com/apache/arrow-rs/pull/2077#issuecomment-1185487310

   @viirya FYI. Maybe you could rerun your original benchmark to decide whether this is already enough of an improvement or if we have to use some unsafe.


-- 
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] tustvold merged pull request #2077: Improve performance of set_bits by using copy_from_slice instead of setting individual bytes

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #2077:
URL: https://github.com/apache/arrow-rs/pull/2077


-- 
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