Function petgraph::algo::dominators::simple_fast
source · [−]pub fn simple_fast<G>(graph: G, root: G::NodeId) -> Dominators<G::NodeId>where
G: IntoNeighbors + Visitable,
<G as GraphBase>::NodeId: Eq + Hash,
Expand description
This is an implementation of the engineered “Simple, Fast Dominance Algorithm” discovered by Cooper et al.
This algorithm is O(|V|²), and therefore has slower theoretical running time than the Lengauer-Tarjan algorithm (which is O(|E| log |V|). However, Cooper et al found it to be faster in practice on control flow graphs of up to ~30,000 vertices.