Skip to content

Conversation

@paolobarbolini
Copy link
Contributor

@paolobarbolini paolobarbolini commented Dec 6, 2025

Implements the idea in #148604 (comment).
Enhancement to #149694.

Could we get a perf run?

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2025

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@Urgau
Copy link
Member

Urgau commented Dec 6, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 6, 2025
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 6, 2025
@rust-bors
Copy link

rust-bors bot commented Dec 6, 2025

☀️ Try build successful (CI)
Build commit: 3f3acdf (3f3acdfbe44242af2a9a5419227d7c20c118425e, parent: fbab541a7ad1c22fc51783d03c7d75fa577f5633)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3f3acdf): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 3
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-0.4% [-1.3%, -0.1%] 4
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Max RSS (memory usage)

Results (secondary -2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.1% [0.8%, 1.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-6.4%, -0.9%] 11
All ❌✅ (primary) - - 0

Cycles

Results (primary -3.2%, secondary 1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [2.1%, 6.6%] 7
Improvements ✅
(primary)
-3.2% [-3.2%, -3.2%] 1
Improvements ✅
(secondary)
-6.5% [-6.8%, -6.2%] 2
All ❌✅ (primary) -3.2% [-3.2%, -3.2%] 1

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-1.1%, -0.0%] 30
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 23
All ❌✅ (primary) -0.1% [-1.1%, -0.0%] 30

Bootstrap: 471.701s -> 471.964s (0.06%)
Artifact size: 388.90 MiB -> 388.53 MiB (-0.09%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 6, 2025
@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Dec 7, 2025
@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt: checked 6594 files
tidy check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (library)]: /checkout/library/alloc/src/string.rs:2638: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
tidy [style (library)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.3)
linting python files
---
linting javascript files and applying suggestions
Running eslint on rustdoc JS files
info: ES-Check: there were no ES version matching errors!  🎉
typechecking javascript files
tidy: The following check failed: style (library)
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy /checkout /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo /checkout/obj/build 4 /node/bin/yarn --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1612:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1314:29

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Build completed unsuccessfully in 0:02:49
  local time: Sun Dec  7 10:19:04 UTC 2025
  network time: Sun, 07 Dec 2025 10:19:04 GMT
##[error]Process completed with exit code 1.

@paolobarbolini
Copy link
Contributor Author

paolobarbolini commented Dec 7, 2025

Interesting perf results. Let's see what happens when we specialize on array and Vec iterators...

@Urgau: Could we do another perf run please?

I hope this is ok for you @lolbinarycat since it takes from #148604, #148604 (comment) and #149694

@Urgau
Copy link
Member

Urgau commented Dec 7, 2025

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

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

rust-bors bot added a commit that referenced this pull request Dec 7, 2025
@rust-bors
Copy link

rust-bors bot commented Dec 7, 2025

⌛ Trying commit b6110e5 with merge 522da80

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/20003300074

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 7, 2025
@rust-bors
Copy link

rust-bors bot commented Dec 7, 2025

💥 Test timed out after 21600s

@lolbinarycat
Copy link
Contributor

I would appreciate a Co-Authored-by field on the first commit if you could (git rebase -i then edit on that commit)

unsafe { from_utf8_unchecked_mut(slice) }
}

/// SAFETY: `impl AsRef<str> for S` must be stable
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// SAFETY: `impl AsRef<str> for S` must be stable
/// SAFETY: When calling `<S as AsRef<str>::as_ref()` multiple times, the same value must be returned.

at first I thought you were talking about a consistent trait impl needing to apply in the face of specialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-perf Status: Waiting on a perf run to be completed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants