Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #489 and #2092.
Minor speed up. Picked point 2 from below performance investigations over the last weeks:
the GHPriorityQueue that has an additional
double[]array speeds up pure A* (max values are decreased), but speed is slower for LM and CH routing. Still the LM preparation is faster. See the branch priority_queue_faster. (CH preparation is slightly slower, nearly not significant, for bigger maps)when we remove the
priorityQueue.removecall and allow stale SPTEntries we can have some speed ups although not so strong. But the advantage is that LM routing is also ~10% faster, the max values are reduced too and no changes for CH. This finding is interesting as when I tried this some years ago it reduced speed slightly.when implementing a faster
priorityQueue.updatemethod (that does remove and insert into the heap at the same time) I did not measure a difference for GHPriorityQueue (might be different for java's PriorityQueue).replacing our custom queue implementation in PreparationContractionHierarchies (GHTreeMapComposed) with a standard PriorityQueue then CH prep gets much slower. I'm sure I did something wrong but I couldn't find the problem. Another trial for PreparationContractionHierarchies could be to use the LongPriorityQueue from lucene, so that we can store key and value into the
long[]array and avoid object creation.Combining 1 and 2 results in no changes for LM (i.e. an advantage over 1 alone) and significant speed up (35%!) for LM preparation (advantage over 1 and 2) but still slow CH routing (disadvantage over 2 alone).
This does not speed up the algorithm: check if the traversalId is already existent in the opposite direction then we could avoid the approximation as we already know the exact complete path! We can even avoid calculating the weight for edge-based traversal.
update: something is wrong with my cherry-picked version of the original branch. Will have to investigate.