It actually makes sense to memoize results here, since we're definitely going to be walking the same path from different vertices.