Skip to content

Conversation

cppcoffee
Copy link
Contributor

Replace O(n²) linear search with O(log n) binary search for checking selection overlaps when finding next selection range. Pre-sort selection ranges and use binary search to significantly improve performance when working with many selections.

Release Notes:

  • N/A

Replace O(n²) linear search with O(log n) binary search for checking
selection overlaps when finding next selection range. Pre-sort selection
ranges and use binary search to significantly improve performance when
working with many selections.

Signed-off-by: Xiaobo Liu <[email protected]>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 8, 2025
Signed-off-by: Xiaobo Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant