https://github.com/bgrins/javascript-astar/pull/47 Pushing and reversing is significantly faster than unshifting: Evidence here: https://jsben.ch/mmbYr