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

Remove overcomplicated iterator #409

Merged
merged 9 commits into from
Apr 8, 2022

Conversation

IvanPleshkov
Copy link
Contributor

@IvanPleshkov IvanPleshkov commented Mar 25, 2022

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally using cargo fmt command prior to submission?
  3. Have you checked your code using cargo clippy command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?


points_ids.clear();
for link in self.links(candidate.idx, level) {
if !visited_list.check_and_update_visited(*link) {
Copy link
Member

Choose a reason for hiding this comment

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

In theory the amount of edges for a single node could be larger than get_m - in case we are creating additional links based in indexed payload. In this case we need to limit scoring to only the first M points which pass the filter, even if there are more than M point in total

@generall
Copy link
Member

generall commented Apr 7, 2022

@monatis
Copy link
Contributor

monatis commented Apr 7, 2022

Is the row 5 an outlier for the fixing trick? Anyway, it seems to be offering 15-to-20% speedup compared to the master.

Yes, already tired of the holiday, returning back with full energy on Monday 😄

@IvanPleshkov IvanPleshkov changed the title WIP Remove overcomplicated iterator Remove overcomplicated iterator Apr 7, 2022
@IvanPleshkov
Copy link
Contributor Author

@agourlay
Copy link
Member

agourlay commented Apr 7, 2022

I was wondering why you got a new weird clippy error then I found this line

stable-x86_64-unknown-linux-gnu updated - rustc 1.60.0 (7737e0b5c 2022-04-04) (from rustc 1.59.0 (9d1b2106e 2022-02-23))

Looks like we are pulling the new release right away, it might make sense to lock the rust version used in the CI pipeline.

@agourlay agourlay mentioned this pull request Apr 7, 2022
@generall
Copy link
Member

generall commented Apr 7, 2022

suggested a small refactoring #450 (benchmarks are not affected)

@generall
Copy link
Member

generall commented Apr 8, 2022

Also profile results
profile-new-iter

generall and others added 2 commits April 8, 2022 13:08
* remove action in filtered scorer

* update comment

* move filter to search and link
@IvanPleshkov IvanPleshkov merged commit ff21a13 into master Apr 8, 2022
@IvanPleshkov IvanPleshkov deleted the remove-overcomplicated-iterator branch April 8, 2022 14:05
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