pitrou commented on pull request #11019:
URL: https://github.com/apache/arrow/pull/11019#issuecomment-914425223


   > Note that both algorithms uses NonStablePartitioner to separete Nulls and 
both are unstable.
   
   Oh, you're right! I had forgotten that `partition_nth_indices` was unstable, 
unlike `sort_indices`.
   
   > Clearly, PartitionNthToIndices_nth_element is faster (5-6x) but 
PartitionNthToIndices kernel is not enough to implement TopK/BottomK because 
the first K elements needs to be sorted. 
   
   But if K is small, sorting them should be cheap, right? I'm not sure what 
the cutoff would be... (sqrt(N) perhaps?)
   
   > IMO this PR should first expose a select_k_unstable and look in a follow 
up PR the best implementation for select_k_stable
   
   Agreed!
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to