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

Use derivative for Clone/PartialOrd/Ord/Hash in rustc_type_ir #117407

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Oct 30, 2023

This uses derivative to derive Clone/PartialOrd/Ord/Hash for types in rustc_type_ir. This doesn't derive PartialEq/Eq yet, because I have no idea why those are generating slower implementations from derivative.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Oct 30, 2023
@rustbot
Copy link
Collaborator

rustbot commented Oct 30, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Third-party dependency whitelist may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

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

bors commented Oct 30, 2023

⌛ Trying commit 58dcf53 with merge 5d82b57...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 30, 2023
Use derivative for `Clone` in `rustc_type_ir`

r? `@ghost`

splitting this out for perf...
@bors
Copy link
Contributor

bors commented Oct 30, 2023

☀️ Try build successful - checks-actions
Build commit: 5d82b57 (5d82b57f3260f4698876115087cdd38aa801cd47)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5d82b57): comparison URL.

Overall result: no relevant changes - no 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.

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

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 636.162s -> 636.532s (0.06%)
Artifact size: 304.48 MiB -> 304.44 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 30, 2023
@compiler-errors compiler-errors changed the title Use derivative for Clone in rustc_type_ir Use derivative for Clone/PartialOrd/Ord/Hash in rustc_type_ir Oct 31, 2023
@compiler-errors
Copy link
Member Author

r? @oli-obk

I split this out from the PartialEq and Eq impls, which seems to be the problem with perf in #117184 (comment) (see: #117408)

#[derivative(
Clone(bound = ""),
PartialOrd(bound = ""),
PartialOrd = "feature_allow_slow_enum",
Copy link
Member Author

Choose a reason for hiding this comment

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

ironically "feature_allow_slow_enum" wasn't even the cause for the slowness: #117409 (comment)

@oli-obk
Copy link
Contributor

oli-obk commented Oct 31, 2023

🎉

@bors r+

@bors
Copy link
Contributor

bors commented Oct 31, 2023

📌 Commit 8b4fa0f has been approved by oli-obk

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. labels Oct 31, 2023
@bors
Copy link
Contributor

bors commented Oct 31, 2023

⌛ Testing commit 8b4fa0f with merge d7d9f15...

@bors
Copy link
Contributor

bors commented Oct 31, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing d7d9f15 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 31, 2023
@bors bors merged commit d7d9f15 into rust-lang:master Oct 31, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Oct 31, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d7d9f15): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

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.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 636.965s -> 639.964s (0.47%)
Artifact size: 304.41 MiB -> 304.43 MiB (0.00%)

bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Nov 1, 2023
78: Automated pull from upstream `master` r=tshepang a=github-actions[bot]


This PR pulls the following changes from the upstream repository:

* rust-lang/rust#113970
* rust-lang/rust#117459
  * rust-lang/rust#117451
  * rust-lang/rust#117439
  * rust-lang/rust#117417
  * rust-lang/rust#117388
  * rust-lang/rust#113241
* rust-lang/rust#117462
* rust-lang/rust#117450
* rust-lang/rust#117407
* rust-lang/rust#117444
  * rust-lang/rust#117438
  * rust-lang/rust#117421
  * rust-lang/rust#117416
  * rust-lang/rust#116712
  * rust-lang/rust#116267
* rust-lang/rust#117377
* rust-lang/rust#117419



Co-authored-by: Alexis (Poliorcetics) Bourget <[email protected]>
Co-authored-by: Esteban Küber <[email protected]>
Co-authored-by: David Tolnay <[email protected]>
Co-authored-by: Celina G. Val <[email protected]>
Co-authored-by: Michael Goulet <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Camille GILLOT <[email protected]>
Co-authored-by: lcnr <[email protected]>
Co-authored-by: Zalathar <[email protected]>
Co-authored-by: Oli Scherer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants