Skip to content

Commit 808b951

Browse files
committed
Remove optimization which gives worst benchmark results
1 parent d16d4d2 commit 808b951

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/directed/dijkstra.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,11 @@ where
213213
let mut target_reached = None;
214214
while let Some(SmallestHolder { cost, index }) = to_see.pop() {
215215
let successors = {
216-
let (node, &(_, c)) = parents.get_index(index).unwrap();
216+
let (node, _) = parents.get_index(index).unwrap();
217217
if stop(node) {
218218
target_reached = Some(index);
219219
break;
220220
}
221-
// We may have inserted a node several time into the binary heap if we found
222-
// a better way to access it. Ensure that we are currently dealing with the
223-
// best path and discard the others.
224-
if cost > c {
225-
continue;
226-
}
227221
successors(node)
228222
};
229223
for (successor, move_cost) in successors {

0 commit comments

Comments
 (0)