-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/nav 181 initialize hashset size of marked stops #118
Feature/nav 181 initialize hashset size of marked stops #118
Conversation
- Use multi-day capability of router.
…stops instead of sets.
Thanks @clukas1, looks good. It is a bit difficult to read the code and follow in the debugger due to passing around all the arrays. In this commit 9236013 on the branch feature/NAV-181-extract-marked-stops-class I extracted a Then i tried to get rid of the array copy / new allocation in 7e69a26, by using an int array instead boolean, tracking the rounds. But somehow the logic messes up... Should we introduce a |
@munterfi I've moved the logic of markedStopsMasks to the Query State because they fit in there nicely. The int array will not work, because you will sometimes overwrite a to be checked mark to the new round potentially preventing finding ideal solutions. benchmarking the both solutions (before and after refactoring) shows following results, probably just noise holding them apart. |
Created new pull request, to allow you to review the request.
Change is that boolean[] arrays are used to mask routesToScan and markedStops instead of HashSets. Performance has been improved significantly.
Original:
With Hashset set to size of Stops/Routes
With Boolean Arrays