Skip to content

incr.comp.: Optimize DepGraph::try_mark_green() #47293

Closed
@michaelwoerister

Description

@michaelwoerister

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 a SmallVec (although such optimizations can easily backfire, so proper profiling is needed here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions