Skip to content

Add new searchsorted implementation - #4656

Merged
ajpotts merged 10 commits into
Bears-R-Us:masterfrom
ShreyasKhandekar:improve-searchsorted
Jul 21, 2025
Merged

ajpotts merged 10 commits into
Bears-R-Us:masterfrom
ShreyasKhandekar:improve-searchsorted

Conversation

@ShreyasKhandekar

@ShreyasKhandekar ShreyasKhandekar commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

This adds a new implementation for searchsorted that performs much better in the distributed case.
Currently it only kicks in when x2 is also sorted.

This demonstrates much better weak scaling than the older implementation

@ShreyasKhandekar
ShreyasKhandekar force-pushed the improve-searchsorted branch 2 times, most recently from 3a6a53a to 36721ae Compare July 1, 2025 00:02

@e-kayrakli e-kayrakli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am good with this PR as is. I left some comments inline for your consideration. Thanks!

Comment thread src/SortMsg.chpl Resolved
Comment thread src/SortMsg.chpl Resolved
Comment thread src/SortMsg.chpl Resolved
Comment thread src/SortMsg.chpl Resolved
Comment thread src/SortMsg.chpl Resolved
Comment thread src/SortMsg.chpl Resolved
Comment thread tests/numpy/sort_test.py Resolved
@ShreyasKhandekar
ShreyasKhandekar force-pushed the improve-searchsorted branch 2 times, most recently from dccd99e to e0518e7 Compare July 7, 2025 23:27

@1RyanK 1RyanK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's safe to assume for now that either one locale won't end up with the whole search space, or that if it does, it won't be insanely large. In general I imagine that the number of things being searched for is significantly less than the number of things we're searching through. If users run into problems with this, we can revisit.

Comment thread arkouda/numpy/sorting.py Resolved
Comment thread tests/numpy/sort_test.py Resolved
Comment thread src/SortMsg.chpl Resolved
@ShreyasKhandekar
ShreyasKhandekar force-pushed the improve-searchsorted branch 2 times, most recently from 910cc16 to 636f37e Compare July 11, 2025 21:32
Comment thread tests/numpy/sort_test.py Resolved
This is optimized for the case where x2 is also sorted

Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
@ajpotts
ajpotts enabled auto-merge July 21, 2025 19:04
@ajpotts
ajpotts added this pull request to the merge queue Jul 21, 2025
Merged via the queue into Bears-R-Us:master with commit 838dc03 Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants