Skip to content

[DO NOT MERGE] next-solver perf test - #164198

Closed
lcnr wants to merge 11 commits into
rust-lang:mainfrom
lcnr:perf-test-next
Closed

lcnr wants to merge 11 commits into
rust-lang:mainfrom
lcnr:perf-test-next

Conversation

@lcnr

@lcnr lcnr commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

r? ghost

lcnr and others added 11 commits October 12, 2026 11:15
The rust-analyzer impls of these methods will need to be removed on the
next sync.
It's faster than `extend` to initialize these structures.
A lot of work can be skipped if the two values being related are equal.
(There are various early-return equality checks like this further down
the call chain, this just adds one earlier.)
The former has an early return check and a single call site, so the
check can be moved before the call site. Also, in the `Err(NoSolution)`
case we can skip the `CandidateHeadUsages::default()` stuff because
that's just an empty list and `merge_usages` is a no-op.
Instead of getting it within `fast_reject_assumption`.

`fast_reject_assumption` has three call sites. For two of them this
change doesn't help perf, but the third call occurs in a loop, and this
lets us get the goal lang item once per loop instead of once per loop
element.
- Increase the number of preinterned type vars and anon bound types.
- Preintern some root-universe placeholder types with anon bounds.
- Adjust some comments.
- Also rename a lot of the preinterning names for more consistency.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 12, 2026
@lcnr

lcnr commented Oct 12, 2026

Copy link
Copy Markdown
Contributor 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 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 12, 2026
[DO NOT MERGE] next-solver perf test
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
tidy check
x.py completions check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (tests)]: /checkout/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-unsoundness.rs: missing trailing newline
tidy [style (tests)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.12' and 'venv'
Requirement already satisfied: pip in ./build/venv/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-26.2.1-py3-none-any.whl.metadata (4.6 kB)
---
typechecking javascript files
tidy: The following check failed: style (tests)
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1743
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1828:24

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:02:00
  local time: Mon Oct 12 09:28:33 UTC 2026
  network time: Mon, 12 Oct 2026 09:28:33 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f1494a8 (f1494a8d7038ea0295a71f4a3805766b8f0b561a)
Base parent: b542750 (b5427502dab50cb27d9327d2893ddf2337dd4388)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f1494a8): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@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)
10.0% [0.1%, 196.8%] 272
Regressions ❌
(secondary)
8.1% [0.1%, 90.0%] 234
Improvements ✅
(primary)
-6.9% [-29.7%, -0.2%] 31
Improvements ✅
(secondary)
-9.8% [-79.3%, -0.2%] 70
All ❌✅ (primary) 8.2% [-29.7%, 196.8%] 303

Max RSS (memory usage)

Results (primary 6.0%, 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)
6.0% [0.9%, 28.6%] 196
Regressions ❌
(secondary)
4.3% [0.8%, 11.2%] 49
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-6.5%, -1.1%] 14
All ❌✅ (primary) 6.0% [0.9%, 28.6%] 196

Cycles

Results (primary 10.3%, secondary 4.7%)

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

mean range count
Regressions ❌
(primary)
11.9% [1.9%, 147.3%] 202
Regressions ❌
(secondary)
11.0% [2.0%, 52.8%] 119
Improvements ✅
(primary)
-6.9% [-20.3%, -2.0%] 19
Improvements ✅
(secondary)
-18.7% [-77.5%, -1.9%] 32
All ❌✅ (primary) 10.3% [-20.3%, 147.3%] 221

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 490.336s -> 488.342s (-0.41%)
Artifact size: 406.60 MiB -> 402.57 MiB (-0.99%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 12, 2026
@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #164216) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

@lcnr lcnr closed this Oct 13, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants