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

Revert parts of #66405. #67471

Merged
merged 1 commit into from
Jan 1, 2020
Merged

Revert parts of #66405. #67471

merged 1 commit into from
Jan 1, 2020

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Dec 21, 2019

Because PR #66405 caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes #67454.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2019
@nnethercote
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 Dec 21, 2019

⌛ Trying commit 694e59388332d3e360c998b1494360cb8a04269e with merge 1f56c6236b5b488c73c83200b59b74c26868a66b...

@bors
Copy link
Contributor

bors commented Dec 21, 2019

☀️ Try build successful - checks-azure
Build commit: 1f56c6236b5b488c73c83200b59b74c26868a66b (1f56c6236b5b488c73c83200b59b74c26868a66b)

@rust-timer
Copy link
Collaborator

Queued 1f56c6236b5b488c73c83200b59b74c26868a66b with parent ccd2383, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 1f56c6236b5b488c73c83200b59b74c26868a66b, comparison URL.

@nikomatsakis
Copy link
Contributor

Hmm, the perf results don't seem too reflect much improvement?

@Mark-Simulacrum
Copy link
Member

We've had trouble with the perf results on this PR historically - the perf server is not quite accepting of the wins (or I guess losses too) that @nnethercote manages to measure locally. We're not sure why, though we've mostly eliminated bugs in the perf server itself such as measuring different artifacts.

It might be an architecture difference (e.g., @nnethercote is not using AMD chips) but that would be quite surprising to me.

@nnethercote
Copy link
Contributor Author

nnethercote commented Dec 21, 2019

This PR is expected to be a small performance loss on the benchmarks, because it reverts #66405, which was a small performance gain on the benchmarks, mostly for inflate and keccak.

But as @Mark-Simulacrum says, the perf results were very strange for that PR: inconsistent across multiple CI runs, all of which didn't really match my local results. (To the point where I did an experiment in #67248 to make sure the right revisions were being tested; they were.) And the results above are equally inconsistent, with as many wins as there are losses. And I have no idea why unicode_normalization has the largest change, it shouldn't be affected by ObligationForest changes. The whole thing is a mess.

Anyway, overall I think we should land this because it has minimal effect on the benchmark suite, but is known to fix some catastrophic performance regressions for real-world programs outside the benchmark suite (in #67454 and #67331). We should also backport this to beta, so that no rustc release contains the regression.

I won't have a chance to analyze what went wrong in #66405 until I get back from PTO in late January, unfortunately.

One could also argue that the test program in #67454 should be added to the benchmark suite to prevent future regressions of this sort.

@Mark-Simulacrum Mark-Simulacrum added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 21, 2019
@sdroege
Copy link
Contributor

sdroege commented Dec 22, 2019

One could also argue that the test program in #67454 should be added to the benchmark suite to prevent future regressions of this sort.

Can code in the benchmarks depend on external crates? If so I can prepare a PR for this.

@nnethercote
Copy link
Contributor Author

Can code in the benchmarks depend on external crates? If so I can prepare a PR for this.

They can, and most of them do!

@sdroege
Copy link
Contributor

sdroege commented Dec 22, 2019

Perfect, took me a while to find the right repo but here it is: rust-lang/rustc-perf#588 :)

@sdroege
Copy link
Contributor

sdroege commented Dec 30, 2019

What's blocking this to be merged?

@nikomatsakis
Copy link
Contributor

Nothing, sorry, r=me -- but needs rebase

@memoryruins
Copy link
Contributor

From #67454 (comment)

I'm about to go on vacation for 6 weeks, so I will file a PR to back out #66405 before I go.

Since they return ~a day before the next release, someone else with permissions might need to handle the rebase.

@Mark-Simulacrum
Copy link
Member

I will rebase and r=niko shortly.

@Mark-Simulacrum
Copy link
Member

@bors r=nikomatsakis rollup=never

@bors
Copy link
Contributor

bors commented Dec 31, 2019

📌 Commit d9f14507f6150078407a466acf48d497d8ad8711 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 31, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-31T22:34:04.8387293Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-31T22:34:05.6919091Z ##[command]git config gc.auto 0
2019-12-31T22:34:05.6924634Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-31T22:34:05.6926816Z ##[command]git config --get-all http.proxy
2019-12-31T22:34:05.6933149Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/67471/merge:refs/remotes/pull/67471/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Because it caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes rust-lang#67454.
@Mark-Simulacrum
Copy link
Member

@bors r=nikomatsakis rollup=never

@bors
Copy link
Contributor

bors commented Dec 31, 2019

📌 Commit 18a3669 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jan 1, 2020

⌛ Testing commit 18a3669 with merge e380efa...

bors added a commit that referenced this pull request Jan 1, 2020
Revert parts of #66405.

Because PR #66405 caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes #67454.

r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Jan 1, 2020

☀️ Test successful - checks-azure
Approved by: nikomatsakis
Pushing e380efa to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 1, 2020
@bors bors merged commit 18a3669 into rust-lang:master Jan 1, 2020
@fengalin
Copy link

fengalin commented Jan 4, 2020

Many thanks, compilation times for this use case are back to normal on nightly now.

Friendly reminder, @nnethercote commented:

We should also backport this to beta, so that no rustc release contains the regression

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

discussed at T-compiler meeting. Accepted for beta-backport.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 23, 2020
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 23, 2020
bors added a commit that referenced this pull request Jan 24, 2020
[beta] backports

This backports:
 * Do not ICE on malformed suggestion spans #68256
 * Distinguish between private items and hidden items in rustdoc #67875
 *  Revert parts of #66405. #67471

It also includes a few formatting commits to permit the backports to proceed cleanly (those are scoped to the relevant files, but still generate noise, of course). This was deemed easier than attempting to manually deal with the formatting.

r? @ghost
@nnethercote nnethercote deleted the revert-66405 branch February 5, 2020 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase in compilation times with newest beta & nightly