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

Add {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}{,Assign}<$t> to Saturat… #92356

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

kellerkindt
Copy link
Contributor

Tracking issue #92354

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 28, 2021
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

@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 Jan 5, 2022
@bors
Copy link
Contributor

bors commented Jan 5, 2022

⌛ Trying commit 1c0dc18 with merge 500ba85ad4d49bc3023225770346fae0ddfabab6...

@bors
Copy link
Contributor

bors commented Jan 5, 2022

☀️ Try build successful - checks-actions
Build commit: 500ba85ad4d49bc3023225770346fae0ddfabab6 (500ba85ad4d49bc3023225770346fae0ddfabab6)

@rust-timer
Copy link
Collaborator

Queued 500ba85ad4d49bc3023225770346fae0ddfabab6 with parent 5883b87, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (500ba85ad4d49bc3023225770346fae0ddfabab6): comparison url.

Summary: This change led to large relevant regressions 😿 in compiler performance.

  • Large regression in instruction counts (up to 3.0% on full builds of helloworld)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jan 5, 2022
@Mark-Simulacrum
Copy link
Member

Regression is in doc builds, which is probably to be expected -- rustdoc is dependent on the whole all trait impls for each compilation rather than anything more local today, and this is adding a lot of trait impls.

r? @dtolnay as this is a fairly extensive expansion of library surface area. The impl itself seems OK, I think, but could use another set of eyes to to confirm. I felt particularly unsure about the Rem impl (I think it does the right thing though).

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

I am on board with this. Thanks!

@dtolnay
Copy link
Member

dtolnay commented Jan 16, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jan 16, 2022

📌 Commit 1c0dc18 has been approved by dtolnay

@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 Jan 16, 2022
@bors
Copy link
Contributor

bors commented Jan 16, 2022

⌛ Testing commit 1c0dc18 with merge 26c06cf...

@bors
Copy link
Contributor

bors commented Jan 16, 2022

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 26c06cf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 16, 2022
@bors bors merged commit 26c06cf into rust-lang:master Jan 16, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 16, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (26c06cf): comparison url.

Summary: This change led to large relevant regressions 😿 in compiler performance.

  • Large regression in instruction counts (up to 2.8% on full builds of helloworld)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

@m-ou-se
Copy link
Member

m-ou-se commented Jan 22, 2022

@kellerkindt for next time: When you're changing/expanding an existing unstable feature (like Saturating), it's usually better to re-use the same tracking issue. Tracking different parts of such a feature in different tracking issues makes them harder to track.

@kellerkindt
Copy link
Contributor Author

Alright. I wasn't sure whether the stabilization of saturating_int_assign_impl would lead to a bigger discussion and I didn't want to block the main type Saturating from being stabilized that way. I wasn't aware of #55436.

Thank you for the info.

kellerkindt added a commit to kellerkindt/rust that referenced this pull request Jan 25, 2022
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Feb 7, 2022
…l, r=m-ou-se

Impl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}Assign<$t> for Wrapping<$t> for rust 1.60.0

Tracking issue rust-lang#93204

This is about adding basic integer operations to the `Wrapping` type:

```rust
let mut value = Wrapping(2u8);
value += 3u8;
value -= 1u8;
value *= 2u8;
value /= 2u8;
value %= 2u8;
value ^= 255u8;
value |= 123u8;
value &= 2u8;
```

Because this adds stable impls on a stable type, it runs into the following issue if an `#[unstable(...)]` attribute is used:

```
an `#[unstable]` annotation here has no effect
note: see issue rust-lang#55436 <rust-lang#55436> for more information
```

This means - if I understood this correctly - the new impls have to be stabilized instantly.
Which in turn means, this PR has to kick of an FCP on the tracking issue as well?

This impl is analog to 1c0dc18 rust-lang#92356 for the `Saturating` type `@dtolnay`  `@Mark-Simulacrum`
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Feb 7, 2022
…l, r=m-ou-se

Impl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}Assign<$t> for Wrapping<$t> for rust 1.60.0

Tracking issue rust-lang#93204

This is about adding basic integer operations to the `Wrapping` type:

```rust
let mut value = Wrapping(2u8);
value += 3u8;
value -= 1u8;
value *= 2u8;
value /= 2u8;
value %= 2u8;
value ^= 255u8;
value |= 123u8;
value &= 2u8;
```

Because this adds stable impls on a stable type, it runs into the following issue if an `#[unstable(...)]` attribute is used:

```
an `#[unstable]` annotation here has no effect
note: see issue rust-lang#55436 <rust-lang#55436> for more information
```

This means - if I understood this correctly - the new impls have to be stabilized instantly.
Which in turn means, this PR has to kick of an FCP on the tracking issue as well?

This impl is analog to 1c0dc18 rust-lang#92356 for the `Saturating` type ``@dtolnay``  ``@Mark-Simulacrum``
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. 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.

9 participants