incr.comp.: Store DepNode colors in a dense array instead of a hashmap. by michaelwoerister · Pull Request #48206 · rust-lang/rust (original) (raw)

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation12 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

michaelwoerister

@michaelwoerister

@michaelwoerister

@bors

⌛ Trying commit d4b8475 with merge b9b23ff5e8fb80c09f74cc608d96763149daecfa...

@bors

@michaelwoerister

@Mark-Simulacrum

@pietroalbini pietroalbini added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Feb 14, 2018

@michaelwoerister

Mark-Simulacrum

fn insert(&mut self, index: SerializedDepNodeIndex, color: DepNodeColor) {
self.values[index] = match color {
DepNodeColor::Red => COMPRESSED_RED,
DepNodeColor::Green(index) => index.0 + COMPRESSED_FIRST_GREEN,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're storing this at the index anyway, do we need to store the index value in it? Seems like perhaps no, in which case we could fairly easily optimize the IndexVec to have u8 values instead of `u32.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thought but it's a different index. We address into the array by SerializedDepNodeIndex (that is the index the node had in the depgraph from the previous session) and what we store is the current DepNodeIndex, which is the index the node has in the depgraph currently being built.

@nikomatsakis

Looks like a mild improvement (a few percent) in some cases; no regressions.

nikomatsakis

@nikomatsakis

@bors

📌 Commit d4b8475 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Feb 14, 2018

@michaelwoerister

Looks like a mild improvement (a few percent) in some cases; no regressions.

Cool, that's pretty much the best that I expected :)

Manishearth added a commit to Manishearth/rust that referenced this pull request

Feb 19, 2018

@Manishearth

Manishearth added a commit to Manishearth/rust that referenced this pull request

Feb 20, 2018

@Manishearth

bors added a commit that referenced this pull request

Feb 20, 2018

@bors

Rollup of 17 pull requests

Manishearth added a commit to Manishearth/rust that referenced this pull request

Feb 24, 2018

@Manishearth

bors added a commit that referenced this pull request

Feb 24, 2018

@bors

Rollup of 15 pull requests

Manishearth added a commit to Manishearth/rust that referenced this pull request

Feb 24, 2018

@Manishearth

bors added a commit that referenced this pull request

Feb 24, 2018

@bors

Rollup of 15 pull requests

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.