Skip to content

Revert "increase perf of charsearcher for single ascii characters" #141678

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

Merged
merged 1 commit into from
May 31, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented May 28, 2025

This reverts commit 245bf50 (PR #141516).

It caused a large doc perf. regression in #141605.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 28, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented May 28, 2025

@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 May 28, 2025
bors added a commit that referenced this pull request May 28, 2025
[do not merge] Revert "increase perf of charsearcher for single ascii characters"

This reverts commit 245bf50.

Trying for perf, because unrolling individual PRs failed in #141605.
@bors
Copy link
Collaborator

bors commented May 28, 2025

⌛ Trying commit cd4f199 with merge 74d6826...

@bors
Copy link
Collaborator

bors commented May 28, 2025

☀️ Try build successful - checks-actions
Build commit: 74d6826 (74d6826c92a6fb600ec35ea03b819563c1c863a6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (74d6826): comparison URL.

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

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-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
1.4% [0.4%, 2.2%] 3
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-1.3% [-7.3%, -0.1%] 37
Improvements ✅
(secondary)
-1.5% [-2.6%, -0.3%] 22
All ❌✅ (primary) -1.1% [-7.3%, 2.2%] 40

Max RSS (memory usage)

Results (primary 0.2%, secondary -4.7%)

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)
1.5% [0.8%, 2.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-4.7% [-4.7%, -4.7%] 1
All ❌✅ (primary) 0.2% [-2.3%, 2.2%] 3

Cycles

Results (primary -0.4%)

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)
1.8% [0.8%, 2.7%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-3.8%, -0.8%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-3.8%, 2.7%] 7

Binary size

Results (primary 0.0%, secondary 0.1%)

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.2% [0.0%, 0.9%] 8
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 38
Improvements ✅
(primary)
-0.2% [-0.5%, -0.0%] 7
Improvements ✅
(secondary)
-0.6% [-0.7%, -0.3%] 4
All ❌✅ (primary) 0.0% [-0.5%, 0.9%] 15

Bootstrap: 778.064s -> 779.335s (0.16%)
Artifact size: 368.46 MiB -> 368.45 MiB (-0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 28, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented May 28, 2025

Huh, the doc regressions in #141605 were from this PR, who knew.

@Kobzol
Copy link
Contributor Author

Kobzol commented May 28, 2025

@workingjubilee #141516 (comment) famous last words xD Should we revert?

@workingjubilee
Copy link
Member

hand me my hat, tonight's dinner has been picked for me

sigh!

r=me if undrafted

@Kobzol Kobzol marked this pull request as ready for review May 29, 2025 05:40
@rustbot
Copy link
Collaborator

rustbot commented May 29, 2025

r? @thomcc

rustbot has assigned @thomcc.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 29, 2025
@Kobzol Kobzol changed the title [do not merge] Revert "increase perf of charsearcher for single ascii characters" Revert "increase perf of charsearcher for single ascii characters" May 29, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented May 29, 2025

r? @workingjubilee

@bors r=workingjubilee

Also CC @bend-n.

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit cd4f199 has been approved by workingjubilee

It is now in the queue for this repository.

@rustbot rustbot assigned workingjubilee and unassigned thomcc May 29, 2025
@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 May 29, 2025
@bend-n
Copy link
Contributor

bend-n commented May 29, 2025

i wonder if it would not cause a perf regression if i used memchr instead of iter::position

@Kobzol
Copy link
Contributor Author

Kobzol commented May 29, 2025

Feel free to send the PR again (once the revert is merged) and we can do a perf. run to try out! :)

@bors
Copy link
Collaborator

bors commented May 31, 2025

⌛ Testing commit cd4f199 with merge e0d014a...

@bors
Copy link
Collaborator

bors commented May 31, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing e0d014a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 31, 2025
@bors bors merged commit e0d014a into rust-lang:master May 31, 2025
8 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 31, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing ec28ae9 (parent) -> e0d014a (this PR)

Test differences

Show 24 test diffs

24 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e0d014a3dffbb3f0575cfbeb0f480c5080c4d018 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 7561.4s -> 5730.5s (-24.2%)
  2. dist-x86_64-apple: 7677.4s -> 8900.4s (15.9%)
  3. dist-aarch64-apple: 5159.1s -> 5582.9s (8.2%)
  4. dist-apple-various: 6813.2s -> 7333.6s (7.6%)
  5. x86_64-apple-2: 5134.3s -> 4757.4s (-7.3%)
  6. x86_64-apple-1: 8282.7s -> 8881.7s (7.2%)
  7. aarch64-apple: 5129.2s -> 4816.8s (-6.1%)
  8. aarch64-gnu: 6631.2s -> 7031.3s (6.0%)
  9. dist-android: 2434.7s -> 2580.1s (6.0%)
  10. dist-ohos-aarch64: 4734.1s -> 4472.1s (-5.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@bors bors mentioned this pull request May 31, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e0d014a): comparison URL.

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

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
1.9% [1.6%, 2.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-7.3%, -0.2%] 36
Improvements ✅
(secondary)
-1.6% [-4.2%, -0.3%] 25
All ❌✅ (primary) -1.2% [-7.3%, 2.2%] 38

Max RSS (memory usage)

Results (primary 2.0%, secondary 0.8%)

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)
4.1% [1.7%, 6.3%] 4
Regressions ❌
(secondary)
1.1% [0.4%, 3.0%] 11
Improvements ✅
(primary)
-6.1% [-6.1%, -6.1%] 1
Improvements ✅
(secondary)
-0.8% [-1.0%, -0.6%] 2
All ❌✅ (primary) 2.0% [-6.1%, 6.3%] 5

Cycles

Results (primary -0.9%, secondary 0.3%)

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)
2.0% [1.6%, 2.4%] 2
Regressions ❌
(secondary)
2.2% [0.5%, 5.4%] 6
Improvements ✅
(primary)
-2.3% [-3.5%, -1.0%] 4
Improvements ✅
(secondary)
-0.8% [-1.1%, -0.4%] 11
All ❌✅ (primary) -0.9% [-3.5%, 2.4%] 6

Binary size

Results (primary -0.1%, secondary 0.1%)

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.2% [0.0%, 0.9%] 11
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 38
Improvements ✅
(primary)
-0.3% [-1.2%, -0.0%] 10
Improvements ✅
(secondary)
-0.6% [-0.7%, -0.3%] 4
All ❌✅ (primary) -0.1% [-1.2%, 0.9%] 21

Bootstrap: 776.684s -> 777.196s (0.07%)
Artifact size: 370.33 MiB -> 370.47 MiB (0.04%)

@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Jun 2, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jun 3, 2025
Revert "increase perf of charsearcher for single ascii characters"

This reverts commit 245bf50 (PR rust-lang#141516).

It caused a large `doc` perf. regression in rust-lang#141605.
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-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.

8 participants