-
Notifications
You must be signed in to change notification settings - Fork 1
Description
While testing out this program, I think I found a bug in Dijkstra’s analytics (i.e 'Dijkstra’s visited _ nodes in: _ ms. Path length = _’). BFS is very similar to Dijkstra’s, so their computation time should also be similar. However, despite the nodes visited and path length being pretty much the same, Dijkstra's computation time is drastically different. See the screenshots below:


"
1] BFS visited 1356 nodes in: 19.00 ms. Path length = 69.
[2] Dijkstra's visited 1355 nodes in: 1135.00 ms. Path length = 69.
“
I ran this is Safari on a 2021 MacBook Air. Interestingly, when I ran it in google with the same default settings and node layout, Dijkstra's computation time was much smaller (though still seemingly incorrect):

"
[1] BFS visited 1413 nodes in: 23.80 ms. Path length = 70.
[2] Dijkstra's visited 1412 nodes in: 196.6 ms. Path length = 70.
“
It does not make sense that Dijstras takes nearly 100x more time than BFS in Chrome and 500x in Safari.