Closed
Description
DepGraph::try_mark_green()
is a rather hot function, especially in compilation sessions that see a lot of re-use. It can probably be made faster by:
- using an array instead of a hashmap for storing node colors,
- and maybe, by re-using the
current_deps
vector among recursive invocations or using aSmallVec
(although such optimizations can easily backfire, so proper profiling is needed here).