Skip to content

Rollup of 7 pull requests #118405

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 16 commits into from
Nov 28, 2023
Merged

Rollup of 7 pull requests #118405

merged 16 commits into from
Nov 28, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ksw2000 and others added 16 commits November 24, 2023 17:18
This cuts >100kb from a local librustc_driver.so build, and seems just
obviously simpler.
this avoids part of the char decoding work by not looking at utf8 continuation bytes
For these two methods, `other` is an ordinary unsigned integer, so it can be zero.

Since the sum of non-zero and zero is always non-zero, the safety argument
holds even when `other` is zero.
optimize str::iter::Chars::advance_by

```
OLD:
    str::iter::chars_advance_by_0001  0.00ns/iter  +/- 0.00ns
    str::iter::chars_advance_by_0010 13.00ns/iter  +/- 1.00ns
    str::iter::chars_advance_by_1000  1.20µs/iter +/- 15.00ns

NEW:
    str::iter::chars_advance_by_0001  0.00ns/iter +/- 0.00ns
    str::iter::chars_advance_by_0010  6.00ns/iter +/- 0.00ns
    str::iter::chars_advance_by_1000 75.00ns/iter +/- 1.00ns
```
Update mod comment

The comment of `ASCII_CASE_MASK` on line 477  is `If 6th bit is set ascii is lower case.` but the original comment of `*self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)` was `Toggle the fifth bit if this is a lowercase letter`
Update `OnceLock` documentation to give a concrete 'lazy static' example, and expand on the existing example.
…ts, r=cuviper

Rename `{collections=>alloc}{tests,benches}`

The crate is named `alloc` so this makes more sense. Ig this is fallout from rust-lang#42648?
… r=compiler-errors

Simplify indenting in THIR printing

This cuts >100kb from a local librustc_driver.so build, and seems just obviously simpler.
…t-repr, r=compiler-errors

Detect and reject malformed `repr(Rust)` hints

Fixes rust-lang#118334.
Fix comments for unsigned non-zero `checked_add`, `saturating_add`

While looking at rust-lang#118313, I happened to notice that two of the expanded comments appear to be slightly inaccurate.

For these two methods, `other` is an ordinary unsigned integer, so it can be zero.

Since the sum of non-zero and zero is always non-zero, the safety argument holds even when `other` is zero.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 28, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Collaborator

bors commented Nov 28, 2023

📌 Commit 4f3ee30 has been approved by matthiaskrgr

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 Nov 28, 2023
@bors
Copy link
Collaborator

bors commented Nov 28, 2023

⌛ Testing commit 4f3ee30 with merge 46a24ed...

@bors
Copy link
Collaborator

bors commented Nov 28, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 46a24ed to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 28, 2023
@bors bors merged commit 46a24ed into rust-lang:master Nov 28, 2023
@rustbot rustbot added this to the 1.76.0 milestone Nov 28, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#115331 optimize str::iter::Chars::advance_by 69f86055c296f97097aa1839adb3f04030e54a76 (link)
#118236 Update mod comment 31f7313c41ae9ebc5b543619bf88d91696a5f95f (link)
#118299 Update OnceLock documentation to give a concrete 'lazy st… 7c4a2486c3fbb8f0a3c82c3e06ebbdf9f23fe270 (link)
#118314 Rename {collections=>alloc}{tests,benches} 5f09f08d12cfa369cd068fa5c6f2d3cb596e51a6 (link)
#118341 Simplify indenting in THIR printing 6dca19186e468d633f1fb0445f994f10a366cd96 (link)
#118366 Detect and reject malformed repr(Rust) hints 5b55f00f75a8448e08f60a9c44e053a988387bcc (link)
#118397 Fix comments for unsigned non-zero checked_add, `saturati… 761efba20102beb87bf9eccfc2af0f946c93b5c7 (link)

previous master: e06c94d6cb

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (46a24ed): 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.5% [0.4%, 0.6%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-1.3%, -0.2%] 4
All ❌✅ (primary) 0.5% [0.4%, 0.6%] 3

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.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
2.8% [2.2%, 3.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-8.2%, -2.1%] 2
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

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)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.4%, -2.0%] 3
All ❌✅ (primary) - - 0

Binary size

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.1% [0.1%, 0.2%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.2%] 4

Bootstrap: 673.509s -> 672.848s (-0.10%)
Artifact size: 313.37 MiB -> 313.34 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Nov 28, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-3a2eevc branch March 16, 2024 18:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.