SIGN IN SIGN UP

Speed up transitive_dep_hash for singleton SCCs (#21390)

I noticed on a large codebase ~99.84% of SCCs are singletons.

So the two main changes are adding a singleton fast path and extracting
`graph[id]` to be a local variable so that it does the lookup once per
module rather than once per dependency,

The time in the `transitive_dep_hash` function drops 22%, and improved
the overall warm run by 1%
K
Kevin Kannammalil committed
5e7e91bc7aafccf370b2a3f3111377cbab0057e3
Parent: d69ab34
Committed by GitHub <noreply@github.com> on 6/5/2026, 12:14:44 AM