-
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
Make Encodable
and Encoder
infallible.
#94732
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9e1eb27b5c6a145f2f91c64d132efdb55e0acdc2 with merge 95a1107bff47aa33e13784202ebb1ab616f6e698... |
☀️ Try build successful - checks-actions |
Queued 95a1107bff47aa33e13784202ebb1ab616f6e698 with parent 67b3e81, future comparison URL. |
Finished benchmarking commit (95a1107bff47aa33e13784202ebb1ab616f6e698): comparison url. Summary: This benchmark run shows 41 relevant improvements 🎉 to instruction counts.
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 led to changes in compiler perf. @bors rollup=never |
9e1eb27
to
5c95390
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 5c9539014954117f204b6ec98cfc9a948cb4fb54 with merge d0cd2938533ad693c7fc03067773dec8bf4728d4... |
☀️ Try build successful - checks-actions |
Queued d0cd2938533ad693c7fc03067773dec8bf4728d4 with parent e70c60d, future comparison URL. |
Finished benchmarking commit (d0cd2938533ad693c7fc03067773dec8bf4728d4): 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. 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 |
5c95390
to
a81c7f0
Compare
This isn't the most compelling PR I've ever written, but I think it's worth merging. Pros:
Cons:
r? @bjorn3 Best reviewed one commit at a time. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a81c7f05b6356a8a660c5a9ce991cadec82c86f7 with merge 4fea8241b7f680ccdb8fa6e05ed2ce503bd6c1ba... |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1a97162): 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. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
@nnethercote This is worse than the previous run. On average it now seems to not have much effect at all. |
Sigh. I have no idea what happened here. I did three perf runs before the merge on different versions. They were all uniform improvements on instruction counts, and there wasn't much difference between the various versions. And clearly less work is being done than before, because there's so much less error checking. |
I have filed #97905 to performance test a reversion of this PR, to see what happens. |
…, r=bjorn3 Revert part of rust-lang#94372 to improve performance rust-lang#94732 was supposed to give small but widespread performance improvements, as judged from three per-merge performance runs. But the performance run that occurred after merging included a roughly equal number of improvements and regressions, for unclear reasons. This PR is for a test run reverting those changes, to see what happens. r? `@ghost`
Good news: #97905 fixed the regressions here. That PR plus this PR combined gave a clear performance win. |
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in rust-lang#94732 and then was reverted in rust-lang#97905 because of a perf regression caused by commit 4 in rust-lang#94732.)
Rename rustc_serialize::opaque::Encoder as MemEncoder. This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in rust-lang#94732 and then was reverted in rust-lang#97905 because of a perf regression caused by commit 4 in rust-lang#94732.) r? `@bjorn3`
Thanks @nnethercote ! @rustbot label: perf-regression-triaged |
Rename rustc_serialize::opaque::Encoder as MemEncoder. This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in rust-lang#94732 and then was reverted in rust-lang#97905 because of a perf regression caused by commit 4 in rust-lang#94732.) r? ``@bjorn3``
Rename rustc_serialize::opaque::Encoder as MemEncoder. This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports). (This was previously merged as commit 5 in rust-lang#94732 and then was reverted in rust-lang#97905 because of a perf regression caused by commit 4 in rust-lang#94732.) r? ```@bjorn3```
This simplifies things, but requires making `CacheEncoder` non-generic. (This was previously merged as commit 4 in rust-lang#94732 and then was reverted in rust-lang#97905 because it caused a perf regression.)
… r=bjorn3 Move `finish` out of the `Encoder` trait. This simplifies things, but requires making `CacheEncoder` non-generic. (This was previously merged as commit 4 in rust-lang#94732 and then was reverted in rust-lang#97905 because it caused a perf regression.) r? `@ghost`
A follow-up to #93066.
r? @ghost