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

Return iterators instead of vectors in datafacade_base functions #4969

Closed
ghoshkaj opened this issue Mar 21, 2018 · 0 comments
Closed

Return iterators instead of vectors in datafacade_base functions #4969

ghoshkaj opened this issue Mar 21, 2018 · 0 comments
Assignees

Comments

@ghoshkaj
Copy link
Member

Return iterators instead of vectors in the datafacade_base function as it will be faster to return the iterators instead of making new copies of the vectors and returning those.

For example in #4876, the number of times that GetUncompressedForwardDurations and GetUncompressedReverseDurations get called increases by a large number and in order to ensure that it doesn't become a bottleneck, doing the above would be very helpful.

virtual std::vector<EdgeWeight> GetUncompressedForwardDurations(const EdgeID id) const = 0;
virtual std::vector<EdgeWeight> GetUncompressedReverseDurations(const EdgeID id) const = 0;
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

No branches or pull requests

3 participants