33 ms·
Where did the convention of storing variables local to the algorithm on the vertices/edges being processed, as opposed to in sets/maps local to the function ori
by wallacoloo 9y ago
Where did the convention of storing variables local to the algorithm on the vertices/edges being processed, as opposed to in sets/maps local to the function originate? You can see it with things like `w.onStack` and to a lesser degree `v.lowlink` and `v.index`. I see this convention all the time when it comes to describing graph algorithms, despite it being less generalizable (you can no longer run the algorithm on different graphs in parallel if they share any vertices, nor can you perform the algorithm over an immutable graph). Is this motivated purely by performance?