Skip to content

lazily reevaluate nested goals #142735

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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jun 19, 2025

It sure is a tragedy. Opening just so I have something to show for the last few weeks. This does not yet fix the perf regression in rayon. However, it does pass fuzzing and implements the simplest version of what I want this to be long term.

r? ghost

lcnr added 4 commits June 18, 2025 17:14
also return `EvaluationResult` instead of the final
`StackEntry` to make sure we correctly track information
between reruns.
@rustbot rustbot added 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 Jun 19, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Jun 19, 2025

let's see the perf cost of always building the search tree.

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

⌛ Trying commit 5dc471c with merge 5a6edde

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

rust-bors bot added a commit that referenced this pull request Jun 19, 2025
lazily reevaluate nested goals

It sure is a tragedy. Opening just so I have something to show for the last few weeks. This does not yet fix the perf regression in rayon. However, it does pass fuzzing and implements the simplest version of what I want this to be long term.

r? ghost
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 19, 2025

☀️ Try build successful (CI)
Build commit: 5a6edde (5a6edde1d282dc0c7083290f46e025a0848ae51c, parent: 8de4c7234dd9b97c9d76b58671343fdbbc9a433e)

@rust-timer

This comment has been minimized.

@lcnr lcnr force-pushed the search_graph-5 branch from 541a086 to 0d4195e Compare June 20, 2025 08:20
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
fmt: checked 6076 files
tidy check
Running eslint on rustdoc JS files
tidy: Skipping binary file check, read-only filesystem
##[error]tidy error: /checkout/compiler/rustc_type_ir/src/search_graph/tree.rs:20: 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
##[error]tidy error: /checkout/compiler/rustc_type_ir/src/search_graph/mod.rs:1218: 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
##[error]tidy error: /checkout/compiler/rustc_type_ir/src/search_graph/mod.rs:1274: 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
##[error]tidy error: /checkout/compiler/rustc_type_ir/src/search_graph/mod.rs:1424: 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
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.1.1)
linting python files
All checks passed!
checking python file formatting
28 files already formatted
checking C++ file formatting
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:22
  local time: Fri Jun 20 08:25:31 UTC 2025
  network time: Fri, 20 Jun 2025 08:25:32 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5a6edde): 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.3% [0.3%, 0.3%] 3
Regressions ❌
(secondary)
0.7% [0.3%, 1.2%] 17
Improvements ✅
(primary)
-1.2% [-1.2%, -1.2%] 1
Improvements ✅
(secondary)
-0.4% [-1.1%, -0.1%] 4
All ❌✅ (primary) -0.1% [-1.2%, 0.3%] 4

Max RSS (memory usage)

Results (primary 1.6%, 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)
5.0% [5.0%, 5.0%] 1
Regressions ❌
(secondary)
2.5% [2.4%, 2.6%] 2
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
-2.7% [-2.8%, -2.6%] 2
All ❌✅ (primary) 1.6% [-1.8%, 5.0%] 2

Cycles

Results (primary 1.8%)

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

mean range count
Regressions ❌
(primary)
1.8% [1.8%, 1.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [1.8%, 1.8%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 691.904s -> 693.336s (0.21%)
Artifact size: 372.02 MiB -> 372.05 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 20, 2025
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.

4 participants