-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[EXPERIMENT] Don't actually erase query values #151715
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
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Don't actually erase query values
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 340e234 failed: CI. Failed job:
|
This comment has been minimized.
This comment has been minimized.
|
Looks like value erasure is accidentally load-bearing for satisfying various auto-trait bounds throughout the compiler, so simply turning it off is a non-trivial task. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[EXPERIMENT] Don't actually erase query values
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (71ec6d2): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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 @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.6%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.506s -> 493.944s (4.54%) |
|
☔ The latest upstream changes (presumably #151778) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Closing this as a completed experiment; we can open a new PR if we want to actually make this change. EDIT: The bootstrap-time and artifact-size regressions are big enough that we should probably lean towards keeping value-erasure. |
| impl !LintDiagnostic<'_, ()> for BuiltinLintDiag {} | ||
|
|
||
| impl<D: for<'a> LintDiagnostic<'a, ()> + DynSend + 'static> From<D> for DecorateDiagCompat { | ||
| impl<D: for<'a> LintDiagnostic<'a, ()> + DynSend + DynSync + 'static> From<D> |
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.
Hmm, does Erased<T> by any chance implement Send/Sync when T does not? It probably shouldn't.
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.
It's backed by [u8; N], so it probably does, yeah.
We should probably have some auto-trait bounds on Erased<T> to rule that out.
|
I don't have a link handy to the PR which introduced this change, but you can see in the results above the additional 8MB of code and time it takes to build rustc. |
Yeah, the bootstrap-time and artifact-size regressions are big enough that this isn’t necessarily something we’d want to do. |
This is a perf experiment to see what happens if we tweak the query system's value erasure mechanism to not actually erase anything.
The idea is to simulate what would happen if we removed erasure completely.
r? ghost