Open Paulo-21 opened 2 weeks ago
Totals | |
---|---|
Change from base Build 11840985523: | 0.0% |
Covered Lines: | 18013 |
Relevant Lines: | 18801 |
I think minimizing the number of hashing operations that happen during the shortest path is a good idea in general. But I am not convinced this works, we need to benchmark this more carefully.
I have a feeling this method will be slower for directed graphs, where some nodes are not able to reach all other nodes in the graph. In those cases, having a small hashmap with the nodes that can be reached is much faster than having a large vector with mostly non-visited entries.
I heard your argument and i agree that we should benchmark to be sure that it will be faster when the hashmap was not full filled But in this particular case the hashmap was full filled before the algorithm started so i don't think it will cause any different. I think we can replace every hashmap indexed by NodeId type and that is full filled before algorithm start.
Hello, I removed the hashmap for the shorted path for centrality.
This may improve performance.
Tell me what do u think about :)