Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up the inherent impl overlap check #68911

Merged
merged 5 commits into from
Feb 9, 2020
Merged

Speed up the inherent impl overlap check #68911

merged 5 commits into from
Feb 9, 2020

Conversation

jonas-schievink
Copy link
Contributor

This gives a ~7% improvement in compile times for the stm32f0(x2) crate.

Also addresses @eddyb's comment in #68837 (comment).

@jonas-schievink
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Feb 7, 2020

⌛ Trying commit 000243c with merge a5b4dc5...

bors added a commit that referenced this pull request Feb 7, 2020
Speed up the inherent impl overlap check

This gives a ~7% improvement in compile times for the stm32f0(x2) crate.

Also addresses @eddyb's comment in #68837 (comment).
@bors
Copy link
Contributor

bors commented Feb 7, 2020

☀️ Try build successful - checks-azure
Build commit: a5b4dc5 (a5b4dc5b68506613cdad1d3cc74b89fc42133dbf)

@rust-timer
Copy link
Collaborator

Queued a5b4dc5 with parent 442ae7f, future comparison URL.

@petrochenkov petrochenkov added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2020
@@ -666,7 +666,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

// The `Future` trait has only one associted item, `Output`,
// so check that this is what we see.
let output_assoc_item = self.tcx.associated_items(future_trait).nth(0).unwrap().def_id;
let output_assoc_item = self.tcx.associated_items(future_trait)[0].def_id;
Copy link
Member

Choose a reason for hiding this comment

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

I think this pattern (or worse, looking things up by name) should be replaced with lang items.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, definintely. This was a huge pain when working on generators, since the declaration order of the assoc. types is significant. Not something I'll try to fit in this PR though.

src/librustc/ty/mod.rs Outdated Show resolved Hide resolved
@jonas-schievink
Copy link
Contributor Author

Looks like this made packed-simd build up to 15% faster in the best case, nice! (and no real regressions)

@bors
Copy link
Contributor

bors commented Feb 8, 2020

☔ The latest upstream changes (presumably #65232) made this pull request unmergeable. Please resolve the merge conflicts.

@petrochenkov
Copy link
Contributor

r=me after rebase

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 8, 2020
@jonas-schievink
Copy link
Contributor Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Feb 8, 2020

📌 Commit 58a9284 has been approved by petrochenkov

@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 8, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 8, 2020
…=petrochenkov

Speed up the inherent impl overlap check

This gives a ~7% improvement in compile times for the stm32f0(x2) crate.

Also addresses @eddyb's comment in rust-lang#68837 (comment).
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 8, 2020
…=petrochenkov

Speed up the inherent impl overlap check

This gives a ~7% improvement in compile times for the stm32f0(x2) crate.

Also addresses @eddyb's comment in rust-lang#68837 (comment).
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 9, 2020
…=petrochenkov

Speed up the inherent impl overlap check

This gives a ~7% improvement in compile times for the stm32f0(x2) crate.

Also addresses @eddyb's comment in rust-lang#68837 (comment).
bors added a commit that referenced this pull request Feb 9, 2020
Rollup of 5 pull requests

Successful merges:

 - #68738 (Derive Clone + Eq for std::string::FromUtf8Error)
 - #68742 (implement AsMut<str> for String)
 - #68881 (rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables)
 - #68911 (Speed up the inherent impl overlap check)
 - #68913 (Pretty-print generic params and where clauses on associated types)

Failed merges:

r? @ghost
@bors bors merged commit 58a9284 into rust-lang:master Feb 9, 2020
krishna-veerareddy added a commit to krishna-veerareddy/rust-clippy that referenced this pull request Feb 9, 2020
bors added a commit to rust-lang/rust-clippy that referenced this pull request Feb 9, 2020
@jonas-schievink jonas-schievink deleted the inherent-overlap branch July 26, 2020 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants