-
Notifications
You must be signed in to change notification settings - Fork 13.3k
replace_bound_vars
fast path: check predicates, don't check consts
#99232
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
`ty::Const` doesn't have precomputed type flags, so computing `has_vars_bound_at_or_above` for constants requires us to visit the const and its contained types and constants. A noop fold should be pretty much equally as fast so removing it prevents us from walking the constant twice in case it contains bound vars.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 39a990d with merge 986b0925e1a63333e182d460bda90013cc286a0c... |
d661bba
to
864d2f3
Compare
@rust-timer build 986b0925e1a63333e182d460bda90013cc286a0c |
Queued 986b0925e1a63333e182d460bda90013cc286a0c with parent 431c6f8, future comparison URL. |
r=me with clean perf |
Finished benchmarking commit (986b0925e1a63333e182d460bda90013cc286a0c): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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. @bors rollup=never Footnotes |
@bors r+ rollup=never |
ct.has_vars_bound_at_or_above
callsreplace_bound_vars
fast path: check predicates, don't check consts
☀️ Test successful - checks-actions |
Finished benchmarking commit (144227d): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
split out from #98900
ty::Const
doesn't have precomputed type flags, socomputing
has_vars_bound_at_or_above
for constantsrequires us to visit the const and its contained types
and constants. A noop fold should be pretty much equally as
fast so removing it prevents us from walking the constant twice
in case it contains bound vars.
r? @jackh726