-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Filter param-env predicates for errors before calling to_opt_poly_trait_pred
#107101
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 096f454 with merge 808366dea853cb6250e002068574f2a512167f30... |
If this doesn't work then I'll revert 83fbc71. |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (808366dea853cb6250e002068574f2a512167f30): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking 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 a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Well it looks like we got back the perf regression on diesel completely with this change. The secondary regression I'm tempted to say is noise. r? compiler |
.filter(|p| !p.references_error()) | ||
.filter_map(|p| p.to_opt_poly_trait_pred()); |
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.
The reason this is faster is because Predicate
s cache their type flags, whereas PolyTraitPredicate
s do not. So gathering the type flags for a poly trait predicate is O(# of substs)
and gathering the type flags for a predicate is O(1)
.
to_opt_poly_trait_ref
to_opt_poly_trait_ref
to_opt_poly_trait_pred
@bors r+ rollup |
Rollup of 7 pull requests Successful merges: - rust-lang#106796 (BPF: Disable atomic CAS) - rust-lang#106886 (Make stage2 rustdoc and proc-macro-srv disableable in x.py install) - rust-lang#107101 (Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`) - rust-lang#107109 (ThinBox: Add intra-doc-links for Metadata) - rust-lang#107148 (remove error code from `E0789`, add UI test/docs) - rust-lang#107151 (Instantiate dominators algorithm only once) - rust-lang#107153 (Consistently use dominates instead of is_dominated_by) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
cc #106309 #106757 (comment)
r? @ghost