-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Lowering unnamed fields and anonymous adt #115367
Conversation
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
c0f0f46
to
d9347ee
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
424439f
to
fa89812
Compare
This comment has been minimized.
This comment has been minimized.
fa89812
to
3440d65
Compare
This comment has been minimized.
This comment has been minimized.
3440d65
to
1df9b8a
Compare
This comment has been minimized.
This comment has been minimized.
compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
1df9b8a
to
2b57f9f
Compare
This comment has been minimized.
This comment has been minimized.
2b57f9f
to
a8b76fc
Compare
This comment has been minimized.
This comment has been minimized.
a8b76fc
to
043ed32
Compare
This comment was marked as resolved.
This comment was marked as resolved.
3dce559
to
bf6482b
Compare
2199648
to
0dbd6e9
Compare
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.
I think this is good enough to merge as-is, we can refactor and make further improvements in follow-ups, but this is a big PR and it's going to be prone to conflicts so best to get this progress landed.
@bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bdc1592): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression 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.
CyclesResultsThis 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: 661.706s -> 662.09s (0.06%) |
There seems to be a big regression here on this benchmark, which has a struct with many fields. Should this have affected performance of non-anonymous fields? |
The query Is this problem serious? I'm going to do some refactoring work on this query (to implement struct patterns and struct expressions of unnamed fields), but I'm afraid I won't have much time till next week. |
It would be nice to improve it eventually, it's probably not that rare to have structs with many fields, e.g. generated by macros. But there's no immediate rush :) |
Oh, I only now noticed that it's a tuple struct. Yeah, so tuple structs with many fields are probably quite rare. In any case, if you find any wins here in the future, that would be great! |
No problem, I'll look into this benchmark in the next step of implementation. |
find_field does not need to be a query. The current implementation is quadratic in the number of nested fields. r? `@davidtwco` as you reviewed rust-lang#115367 Fixes rust-lang#121755
find_field does not need to be a query. The current implementation is quadratic in the number of nested fields. r? `@davidtwco` as you reviewed rust-lang#115367 Fixes rust-lang#121755
find_field does not need to be a query. The current implementation is quadratic in the number of nested fields. r? `@davidtwco` as you reviewed rust-lang/rust#115367 Fixes rust-lang/rust#121755
This implements #49804.
Goals:
#[repr(C)]
check of the anonymous ADTsNon-Goals (will be in the next PRs)