rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.#65583
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
@bors try |
|
⌛ Trying commit 2c91ec26a69d472036090c56c99ad5144d213153 with merge 238668d24087abeafc989aadc78ee7c41a3c59d6... |
|
☀️ Try build successful - checks-azure |
|
@rust-timer build 238668d24087abeafc989aadc78ee7c41a3c59d6 |
|
Queued 238668d24087abeafc989aadc78ee7c41a3c59d6 with parent 518deda, future comparison URL. |
|
Finished benchmarking try commit 238668d24087abeafc989aadc78ee7c41a3c59d6, comparison URL. |
|
This is smaller increase than #59953 (comment), which is a good sign:
(Note that the total is compressed with XZ, but also includes |
2c91ec2 to
9af9827
Compare
michaelwoerister
left a comment
There was a problem hiding this comment.
Looks like an improvement! r=me with the nits addressed.
src/librustc_metadata/encoder.rs
Outdated
There was a problem hiding this comment.
Can you try that? It looks like it should.
There was a problem hiding this comment.
I suppose it's easy enough to check.
src/librustc_metadata/encoder.rs
Outdated
There was a problem hiding this comment.
I don't understand what "duplicate this with" means. Do you mean "keep this in sync with"?
There was a problem hiding this comment.
"deduplicate" as in there should be a helper or (even better) this code should exist only in one place.
The comment is old anyway, I think it predates @petrochenkov's revamp of how enum/struct ctors work.
src/librustc_metadata/encoder.rs
Outdated
9af9827 to
371cc39
Compare
|
|
||
| let tables = self.tcx.typeck_tables_of(def_id); | ||
| // NOTE(eddyb) `tcx.type_of(def_id)` isn't used because it's fully generic, | ||
| // including on the signature, which is inferred in `typeck_tables_of. |
There was a problem hiding this comment.
Thanks for finding that out! Makes sense.
|
@bors r+ |
|
📌 Commit 371cc39 has been approved by |
…ables, r=michaelwoerister rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref. This is an attempt at a part of rust-lang#65407, i.e. moving parts of cross-crate "metadata" into tables that match queries more closely. Three new tables should be enough to see some perf/metadata size changes. (need to do something similar to rust-lang#59953 (comment)) There are other bits of data that could be made into tables, but they can be more compact so the impact would likely be not as bad, and they're also more work to set up.
…ables, r=michaelwoerister rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref. This is an attempt at a part of rust-lang#65407, i.e. moving parts of cross-crate "metadata" into tables that match queries more closely. Three new tables should be enough to see some perf/metadata size changes. (need to do something similar to rust-lang#59953 (comment)) There are other bits of data that could be made into tables, but they can be more compact so the impact would likely be not as bad, and they're also more work to set up.
…ables, r=michaelwoerister rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref. This is an attempt at a part of rust-lang#65407, i.e. moving parts of cross-crate "metadata" into tables that match queries more closely. Three new tables should be enough to see some perf/metadata size changes. (need to do something similar to rust-lang#59953 (comment)) There are other bits of data that could be made into tables, but they can be more compact so the impact would likely be not as bad, and they're also more work to set up.
Rollup of 12 pull requests Successful merges: - #64178 (More Clippy fixes for alloc, core and std) - #65144 (Add Cow::is_borrowed and Cow::is_owned) - #65193 (Lockless LintStore) - #65479 (Add the `matches!( $expr, $pat ) -> bool` macro) - #65518 (Avoid ICE when checking `Destination` of `break` inside a closure) - #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.) - #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.) - #65648 (Eliminate `intersect_opt`.) - #65657 (Remove `InternedString`) - #65691 (Update E0659 error code long explanation to 2018 edition) - #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL) - #65704 (relax ExactSizeIterator bound on write_bytes) Failed merges: r? @ghost
This is an attempt at a part of #65407, i.e. moving parts of cross-crate "metadata" into tables that match queries more closely.
Three new tables should be enough to see some perf/metadata size changes.
(need to do something similar to #59953 (comment))
There are other bits of data that could be made into tables, but they can be more compact so the impact would likely be not as bad, and they're also more work to set up.