Optimizing Dijkstra for real-world performance

N Aviram, Y Shavitt - arXiv preprint arXiv:1505.05033, 2015 - arxiv.org
arXiv preprint arXiv:1505.05033, 2015arxiv.org
Using Dijkstra's algorithm to compute the shortest paths in a graph from a single source
node to all other nodes is common practice in industry and academia. Although the original
description of the algorithm advises using a Fibonacci Heap as its internal queue, it has
been noted that in practice, a binary (or $ d $-ary) heap implementation is significantly faster.
This paper introduces an even faster queue design for the algorithm. Our experimental
results currently put our prototype implementation at about twice as fast as the Boost …
Using Dijkstra's algorithm to compute the shortest paths in a graph from a single source node to all other nodes is common practice in industry and academia. Although the original description of the algorithm advises using a Fibonacci Heap as its internal queue, it has been noted that in practice, a binary (or -ary) heap implementation is significantly faster. This paper introduces an even faster queue design for the algorithm. Our experimental results currently put our prototype implementation at about twice as fast as the Boost implementation of the algorithm on both real-world and generated large graphs. Furthermore, this preliminary implementation was written in only a few weeks, by a single programmer. The fact that such an early prototype compares favorably against Boost, a well-known open source library developed by expert programmers, gives us reason to believe our design for the queue is indeed better suited to the problem at hand, and the favorable time measurements are not a product of any specific implementation technique we employed.
arxiv.org
以上显示的是最相近的搜索结果。 查看全部搜索结果