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/06/14 07:16:11 UTC

[GitHub] [arrow-rs] Jimexist opened a new pull request #448: Use partition for bool sort

Jimexist opened a new pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448


   # 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 #447
   
   # Rationale for this change
    
    <!---
    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.

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



[GitHub] [arrow-rs] alamb merged pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448


   


-- 
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-rs] Jimexist commented on pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
Jimexist commented on pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448#issuecomment-861078094


   i guess 1024 is too short an array so it's dominated by the memory allocation rather than sorting


-- 
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-rs] alamb commented on pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448#issuecomment-864395352


   I finally got a chance to re-run the tests
   
   Using 2^14 = 16384
   
   ```
   critcmp master bool-partition
   group                   bool-partition                         master
   -----                   --------------                         ------
   bool sort 2^14          1.00  1912.9±52.24µs        ? ?/sec    1.09      2.1±0.16ms        ? ?/sec
   bool sort nulls 2^12    1.00   404.6±11.62µs        ? ?/sec    1.06   426.9±25.21µs        ? ?/sec
   ```
   
   So looks like a nice change to me
   
   
   Here is the test change in case anyone else wants to try:
   
   ```diff
   diff --git a/arrow/benches/sort_kernel.rs b/arrow/benches/sort_kernel.rs
   index f9f5f24c1..f517afede 100644
   --- a/arrow/benches/sort_kernel.rs
   +++ b/arrow/benches/sort_kernel.rs
   @@ -80,9 +80,9 @@ fn add_benchmark(c: &mut Criterion) {
            b.iter(|| bench_sort(&arr_a, &arr_b, None))
        });
    
   -    let arr_a = create_bool_array(2u64.pow(12) as usize, false);
   -    let arr_b = create_bool_array(2u64.pow(12) as usize, false);
   -    c.bench_function("bool sort 2^12", |b| {
   +    let arr_a = create_bool_array(2u64.pow(14) as usize, false);
   +    let arr_b = create_bool_array(2u64.pow(14) as usize, false);
   +    c.bench_function("bool sort 2^14", |b| {
            b.iter(|| bench_sort(&arr_a, &arr_b, None))
        });
   ```
   
   Sorry for the delay @Jimexist  -- it has been a busy few days for me


-- 
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-rs] alamb commented on pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448#issuecomment-861379544


   > i guess 1024 is too short an array so it's dominated by the memory allocation rather than sorting
   
   I also was under the impression that the partition sort was aiming to improve memory usage rather than speed


-- 
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-rs] alamb commented on pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448#issuecomment-860196301


   I will try and review this tomorrow


-- 
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-rs] Jimexist commented on pull request #448: Use partition for bool sort

Posted by GitBox <gi...@apache.org>.
Jimexist commented on pull request #448:
URL: https://github.com/apache/arrow-rs/pull/448#issuecomment-861407752


   > > i guess 1024 is too short an array so it's dominated by the memory allocation rather than sorting
   > 
   > 
   > 
   > I also was under the impression that the partition sort was aiming to improve memory usage rather than speed
   
   Both but the memory consumption is not so obvious unless partition in place is stabilized which is currently in nightly 


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