-
Notifications
You must be signed in to change notification settings - Fork 13.4k
add additional TypeFlags
fast paths
#141581
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
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
add additional `TypeFlags` fast paths Some crates, e.g. `diesel`, have items with a lot of where-clauses (more than 150). In these cases checking the `TypeFlags` of the whole `param_env` can be very beneficial. This adds `fn fold_clauses` to mirror the existing `fn visit_clauses` and then uses this in folders which fold `ParamEnv`s. Split out from #141451, depends on #141500. r? `@compiler-errors`
@@ -22,8 +22,20 @@ where | |||
cache: DelayedMap<I::Ty, I::Ty>, | |||
} | |||
|
|||
pub fn eager_resolve_vars<D: SolverDelegate, T: TypeFoldable<D::Interner>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that we actually check for has_infer
in fold_clauses
, this change may be unnecessary again 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 idc
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (66697d5): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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 @bors rollup=never Instruction countThis 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.
Max RSS (memory usage)Results (primary -1.0%, secondary 3.9%)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.
CyclesResults (primary -2.0%, secondary -8.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.
Binary sizeResults (primary -1.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.
Bootstrap: 776.359s -> 778.786s (0.31%) |
1a2a21a
to
0830ce0
Compare
r=me (or i'll r+) after ci green |
@bors r+ rollup=never |
actually, for good measure, let's perf this alone. |
@bors r- |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
add additional `TypeFlags` fast paths Some crates, e.g. `diesel`, have items with a lot of where-clauses (more than 150). In these cases checking the `TypeFlags` of the whole `param_env` can be very beneficial. This adds `fn fold_clauses` to mirror the existing `fn visit_clauses` and then uses this in folders which fold `ParamEnv`s. Split out from #141451, depends on #141442. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9170505): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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 @bors rollup=never Instruction countThis 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.
Max RSS (memory usage)Results (primary 1.8%, secondary 5.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.
CyclesResults (secondary -4.0%)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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 778.13s -> 779.873s (0.22%) |
I think this perf improvement is a wash, but it's beneficial for nalgebra in the new and old solvers, so I'm still inclined to land it. Maybe some follow-up perf work can be done to tweak inlining and/or remove unnecessary folding is warranted :> @bors r+ rollup=never |
☀️ Test successful - checks-actions |
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 ebe9b00 (parent) -> 5f025f3 (this PR) Test differencesShow 33280 test diffsStage 1
Stage 2
(and 16566 additional test diffs) Additionally, 16614 doctest diffs were found. These are ignored, as they are noisy. Job group index Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 5f025f363df11c65bd31ade9fe6f48fd4f4239af --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (5f025f3): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis 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.
Max RSS (memory usage)Results (primary -1.4%, secondary -5.6%)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.
CyclesResults (secondary 9.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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 778.76s -> 777.949s (-0.10%) |
Marking as triaged. |
add more `TypeFlags` fast paths, cache `param_env` canonicalization BLocked on #141581
cache `param_env` canonicalization BLocked on #141581
cache `param_env` canonicalization BLocked on rust-lang/rust#141581
cache `param_env` canonicalization BLocked on rust-lang/rust#141581
cache `param_env` canonicalization BLocked on rust-lang/rust#141581
Some crates, e.g.
diesel
, have items with a lot of where-clauses (more than 150). In these cases checking theTypeFlags
of the wholeparam_env
can be very beneficial.This adds
fn fold_clauses
to mirror the existingfn visit_clauses
and then uses this in folders which foldParamEnv
s.Split out from #141451, depends on #141442.
r? @compiler-errors