Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize RadiusResultSet::copy #475

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

xopok
Copy link

@xopok xopok commented Mar 19, 2021

Perform std::partial_sort instead of full std::sort in RadiusResultSet if not all items need to be returned.

Perform std::partial_sort instead of full std::sort in RadiusResultSet if not all items need to be returned.
@tkoeppe
Copy link
Contributor

tkoeppe commented Mar 29, 2021

As discussed elsewhere:

  • retain original whitespace formatting (tabs)
  • consider branching between sort and partial_sort (instead of doing a partial_sort of the full range).

Branched between sort and partial_sort; used the more explicit dist_index_.size() instead of size().
Fix formatting.
@xopok
Copy link
Author

xopok commented Mar 30, 2021

Thomas, I've addressed your feedback. Also merged lines in the partial_sort invocation to match the current style in this file.

@tkoeppe
Copy link
Contributor

tkoeppe commented Mar 30, 2021

Thanks! Looks like a very nice improvement!

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.

None yet

2 participants