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

@nnethercote
Copy link
Contributor Author

@nnethercote nnethercote commented Dec 21, 2019

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

@rust-timer rust-timer commented Dec 21, 2019

Awaiting bors try build completion

@bors
Copy link
Contributor

@bors bors commented Dec 21, 2019

Trying commit 694e593 with merge 1f56c62...

bors added a commit that referenced this pull request Dec 21, 2019
Revert parts of #66405.

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 #67454.

r? @nikomatsakis
@bors
Copy link
Contributor

@bors bors commented Dec 21, 2019

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

@rust-timer
Copy link
Collaborator

@rust-timer rust-timer commented Dec 21, 2019

Queued 1f56c62 with parent ccd2383, future comparison URL.

@rust-timer
Copy link
Collaborator

@rust-timer rust-timer commented Dec 21, 2019

Finished benchmarking try commit 1f56c62, comparison URL.

@nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Dec 21, 2019

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

@Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Dec 21, 2019

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 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.

@sdroege
Copy link
Contributor

@sdroege 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

@nnethercote nnethercote commented Dec 22, 2019

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 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 sdroege commented Dec 30, 2019

What's blocking this to be merged?

@nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Dec 31, 2019

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

@memoryruins
Copy link
Contributor

@memoryruins memoryruins commented Dec 31, 2019

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

@Mark-Simulacrum Mark-Simulacrum commented Dec 31, 2019

I will rebase and r=niko shortly.

@Mark-Simulacrum Mark-Simulacrum force-pushed the nnethercote:revert-66405 branch from 694e593 to d9f1450 Dec 31, 2019
@Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Dec 31, 2019

@bors r=nikomatsakis rollup=never

@bors
Copy link
Contributor

@bors bors commented Dec 31, 2019

📌 Commit d9f1450 has been approved by nikomatsakis

@rust-highfive
Copy link
Collaborator

@rust-highfive rust-highfive commented Dec 31, 2019

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 #67454.
@Mark-Simulacrum Mark-Simulacrum force-pushed the nnethercote:revert-66405 branch from d9f1450 to 18a3669 Dec 31, 2019
@Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Dec 31, 2019

@bors r=nikomatsakis rollup=never

@bors
Copy link
Contributor

@bors bors commented Dec 31, 2019

📌 Commit 18a3669 has been approved by nikomatsakis

@bors
Copy link
Contributor

@bors 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 bors commented Jan 1, 2020

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

@bors bors added the merged-by-bors label Jan 1, 2020
@bors bors merged commit 18a3669 into rust-lang:master Jan 1, 2020
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191231.55 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@fengalin
Copy link

@fengalin 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

@pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Jan 23, 2020

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

bors added a commit that referenced this pull request Jan 23, 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
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 nnethercote:revert-66405 branch Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

You can’t perform that action at this time.