I'm currently using an Ordered Linked List, with items being put in order when added.
Is there a faster way?
- Ordered Linked List = lowest value first.
- Here's the code: https://raw.githubusercontent.com/nojacko/dijkstras-js/master/Dijkstras.js
Implemented arnaud's suggestion of a Fibonacci Heap. It was 32 to 85 times faster with diminishing returns the larger the dataset.
I deviated from the true Fibonacci Heap by not running consolidate every time a value was removed. I found running it once every 50 shifts performed best.