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

Shrink ast::Expr harder #101562

Merged
merged 2 commits into from
Nov 18, 2022
Merged

Conversation

nnethercote
Copy link
Contributor

r? @ghost

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 8, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2022

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@nnethercote nnethercote marked this pull request as draft September 8, 2022 07:32
@nnethercote
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 8, 2022
@bors
Copy link
Contributor

bors commented Sep 8, 2022

⌛ Trying commit 55618ea7ce3e6a75b529e9570b37f77c777ed011 with merge 29c78f7bb22a7e545bae5ae196766f078fe7c1ac...

@bors
Copy link
Contributor

bors commented Sep 8, 2022

☀️ Try build successful - checks-actions
Build commit: 29c78f7bb22a7e545bae5ae196766f078fe7c1ac (29c78f7bb22a7e545bae5ae196766f078fe7c1ac)

@rust-timer
Copy link
Collaborator

Queued 29c78f7bb22a7e545bae5ae196766f078fe7c1ac with parent 4af35b8, future comparison URL.

@rust-log-analyzer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (29c78f7bb22a7e545bae5ae196766f078fe7c1ac): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 7
Improvements ✅
(primary)
-0.8% [-1.3%, -0.4%] 5
Improvements ✅
(secondary)
-1.4% [-3.8%, -0.3%] 32
All ❌✅ (primary) -0.8% [-1.3%, -0.4%] 5

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [2.6%, 4.8%] 5
Improvements ✅
(primary)
-1.4% [-4.4%, -0.8%] 21
Improvements ✅
(secondary)
-3.6% [-5.0%, -0.9%] 12
All ❌✅ (primary) -1.4% [-4.4%, -0.8%] 21

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [0.4%, 2.8%] 2
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
-4.0% [-6.8%, -2.0%] 21
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 8, 2022
@nnethercote nnethercote marked this pull request as ready for review September 8, 2022 11:14
@nnethercote
Copy link
Contributor Author

r? @petrochenkov

@nnethercote
Copy link
Contributor Author

Lots of nice performance wins here across all the metrics, hooray.

@bors

This comment was marked as resolved.

@nnethercote
Copy link
Contributor Author

I fixed the conflicts.

@bors

This comment was marked as resolved.

@nnethercote
Copy link
Contributor Author

@petrochenkov: I have rebased again, should be ready for review.

@nnethercote
Copy link
Contributor Author

The cycles, wall-time, max-rss, and cache-misses results here are pretty good.

r? @petrochenkov

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2022

Could not assign reviewer from: petrochenkov.
User(s) petrochenkov are either the PR author or are already assigned, and there are no other candidates.
Use r? to specify someone else to assign.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 17, 2022

📌 Commit 67d5cc0 has been approved by petrochenkov

It is now in the queue for this repository.

@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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 17, 2022
@bors
Copy link
Contributor

bors commented Nov 18, 2022

⌛ Testing commit 67d5cc0 with merge f6dc382af3e850df6eee3714780066c6d22fdc08...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 18, 2022
@rust-log-analyzer
Copy link
Collaborator

The job i686-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test str::utf8_char_counts ... ok

failures:

---- rc::rc_from_vec_opt stdout ----
thread 'rc::rc_from_vec_opt' panicked at 'assertion failed: `(left == right)`
  left: `-169216`,
 right: `8`: Vector allocation not reused', library\alloc\tests\rc.rs:217:9

failures:
    rc::rc_from_vec_opt


test result: FAILED. 652 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.29s

error: test failed, to rerun pass `-p alloc --test collectionstests`
Build completed unsuccessfully in 0:51:30
make: *** [Makefile:83: ci-mingw-subset-1] Error 1

@petrochenkov
Copy link
Contributor

The error seems unrelated and spurious, but let's check again.
@bors retry

@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 Nov 18, 2022
@matthiaskrgr
Copy link
Member

cc #104563 :(

@bors
Copy link
Contributor

bors commented Nov 18, 2022

⌛ Testing commit 67d5cc0 with merge 70fe5f0...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 70fe5f0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 18, 2022
@bors bors merged commit 70fe5f0 into rust-lang:master Nov 18, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 18, 2022
@nnethercote nnethercote deleted the shrink-ast-Expr-harder branch November 18, 2022 21:17
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (70fe5f0): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.4% [0.2%, 0.8%] 10
Regressions ❌
(secondary)
0.4% [0.1%, 0.7%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.2%] 13
All ❌✅ (primary) 0.4% [0.2%, 0.8%] 10

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.0% [2.4%, 8.2%] 8
Improvements ✅
(primary)
-1.2% [-2.3%, -0.8%] 13
Improvements ✅
(secondary)
-3.3% [-4.5%, -1.5%] 13
All ❌✅ (primary) -1.2% [-2.3%, -0.8%] 13

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-2.3%, -0.6%] 20
Improvements ✅
(secondary)
-3.3% [-7.1%, -1.7%] 48
All ❌✅ (primary) -1.3% [-2.3%, -0.6%] 20

@nnethercote
Copy link
Contributor Author

Instruction count results are mixed. But the real results are for cycles and wall-time, which show lots of improvements.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Nov 19, 2022
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 21, 2022
…r=petrochenkov

Shrink `ast::Expr` harder

r? `@ghost`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants