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 2021/01/25 18:51:59 UTC

[GitHub] [arrow] jorgecarleitao opened a new pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

jorgecarleitao opened a new pull request #9318:
URL: https://github.com/apache/arrow/pull/9318


   This PR speeds up the (non-SIMD) bit operations by using the `from_trusted_len_iterator`. I had to expose it also for `MutableBuffer`, and there is a potential optimization, but I left it as an exercise to the future.
   
   Since this operation is used throughout many kernels and operations, there is some chance of a speedup on other benches and datafusion.
   
   ```
   git checkout master
   cargo bench --bench buffer_bit_ops
   git checkout fast_bit_ops
   cargo bench --bench buffer_bit_ops
   ```
   
   ```
   buffer_bit_ops and      time:   [338.19 ns 339.51 ns 341.21 ns]                               
                           change: [-56.005% -50.176% -45.754%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 3 outliers among 100 measurements (3.00%)
     1 (1.00%) high mild
     2 (2.00%) high severe
   
   buffer_bit_ops or       time:   [341.55 ns 343.00 ns 344.43 ns]                              
                           change: [-47.595% -46.537% -45.633%] (p = 0.00 < 0.05)
                           Performance has improved.
   Found 7 outliers among 100 measurements (7.00%)
     2 (2.00%) high mild
     5 (5.00%) high severe
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me closed pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me closed pull request #9318:
URL: https://github.com/apache/arrow/pull/9318


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me removed a comment on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me removed a comment on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767143458


   Rihanna: Rebase Gone Bad?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767235917


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=h1) Report
   > Merging [#9318](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=desc) (550327d) into [master](https://codecov.io/gh/apache/arrow/commit/437c8c944acb3479b76804f041f5f8cbce309fa7?el=desc) (437c8c9) will **decrease** coverage by `0.00%`.
   > The diff coverage is `91.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9318/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9318      +/-   ##
   ==========================================
   - Coverage   81.88%   81.88%   -0.01%     
   ==========================================
     Files         215      215              
     Lines       52988    52990       +2     
   ==========================================
   + Hits        43391    43392       +1     
   - Misses       9597     9598       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9318/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `96.01% <91.66%> (-0.20%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=footer). Last update [437c8c9...550327d](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767034982


   https://issues.apache.org/jira/browse/ARROW-11383


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767143458


   Rihanna: Rebase Gone Bad?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me closed pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me closed pull request #9318:
URL: https://github.com/apache/arrow/pull/9318


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767143458


   Rihanna: Rebase Gone Bad?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me removed a comment on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me removed a comment on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767143458


   Rihanna: Rebase Gone Bad?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767034982


   https://issues.apache.org/jira/browse/ARROW-11383


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nevi-me commented on a change in pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
nevi-me commented on a change in pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#discussion_r564017139



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -1103,7 +1097,48 @@ impl Buffer {
             "Trusted iterator length was not accurately reported"
         );
         buffer.len = len;
-        Ok(buffer.into())
+        Ok(buffer)
+    }
+}
+
+impl Buffer {
+    /// Creates a [`Buffer`] from an [`Iterator`] with a trusted (upper) length.
+    /// Prefer this to `collect` whenever possible, as it is faster ~60% faster.

Review comment:
       ```suggestion
       /// Prefer this to `collect` whenever possible, as it is ~60% faster.
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] codecov-io commented on pull request #9318: ARROW-11383: [Rust] Faster bit AND and OR (2x)

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#issuecomment-767235917


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=h1) Report
   > Merging [#9318](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=desc) (550327d) into [master](https://codecov.io/gh/apache/arrow/commit/437c8c944acb3479b76804f041f5f8cbce309fa7?el=desc) (437c8c9) will **decrease** coverage by `0.00%`.
   > The diff coverage is `91.66%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9318/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9318      +/-   ##
   ==========================================
   - Coverage   81.88%   81.88%   -0.01%     
   ==========================================
     Files         215      215              
     Lines       52988    52990       +2     
   ==========================================
   + Hits        43391    43392       +1     
   - Misses       9597     9598       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/arrow/src/buffer.rs](https://codecov.io/gh/apache/arrow/pull/9318/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvYnVmZmVyLnJz) | `96.01% <91.66%> (-0.20%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=footer). Last update [437c8c9...550327d](https://codecov.io/gh/apache/arrow/pull/9318?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org