Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
1 of 2 tasks
michaelwoerister opened this issue Jan 9, 2018 · 3 comments
Closed
1 of 2 tasks

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

michaelwoerister opened this issue Jan 9, 2018 · 3 comments
Labels
A-incr-comp Area: Incremental compilation C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@michaelwoerister
Copy link
Member

michaelwoerister commented Jan 9, 2018

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).
@michaelwoerister michaelwoerister added C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compiletime Issue: Problems and improvements with respect to compile times. A-incr-comp Area: Incremental compilation labels Jan 9, 2018
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 19, 2018
…komatsakis

incr.comp.: Store DepNode colors in a dense array instead of a hashmap.

Implements half of rust-lang#47293.

r? @nikomatsakis
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2018
…komatsakis

incr.comp.: Store DepNode colors in a dense array instead of a hashmap.

Implements half of rust-lang#47293.

r? @nikomatsakis
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2018
…komatsakis

incr.comp.: Store DepNode colors in a dense array instead of a hashmap.

Implements half of rust-lang#47293.

r? @nikomatsakis
@michaelwoerister
Copy link
Member Author

#48206 implements the first bullet point.

@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 31, 2020
@gizmondo
Copy link
Contributor

gizmondo commented Jun 4, 2020

Should be closed per #50565?

@wesleywiser
Copy link
Member

Indeed, thanks @gizmondo!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-incr-comp Area: Incremental compilation C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants