-
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
Remove MemEncoder
#111086
Remove MemEncoder
#111086
Conversation
Because we're writing to a file, so `FileEncoder` is better because we don't have to write all the data to memory first.
These commits modify the If this was intentional then you can ignore this comment. |
Best reviewed one commit at a time. |
Round-trip encoding/decoding of many types is tested in `compiler/rustc_serialize/tests/opaque.rs`. There is also a small amount of encoding/decoding testing in three files in `tests/ui-fulldeps`. There is no obvious reason why these three files are necessary. They were originally added in 2014. Maybe it wasn't possible for a proc macro to run in a unit test back then? This commit just moves the testing from those three files into the unit test.
It's only used in tests. Which is bad, because it means that `FileEncoder` is used in the compiler but isn't used in tests! `tests/opaque.rs` now tests encoding/decoding round-trips via file. Because this is slower than memory, this commit also adjusts the `u16`/`i16` tests so they are more like the `u32`/`i32` tests, i.e. they don't test every possible value.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit ebee3f8 with merge 2633ff012f5590d16063be88ca90ebd1aa021e71... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (2633ff012f5590d16063be88ca90ebd1aa021e71): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 Instruction countThis benchmark run did not return any relevant results for this metric. 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 656.873s -> 656.42s (-0.07%) |
Unsurprising that there is no perf effect, given that |
@bors r+ |
@bors rollup |
Remove `MemEncoder` `MemEncoder` only has one non-test use, and `FileEncoder` would be more appropriate there anyway. r? `@cjgillot`
Rollup of 11 pull requests Successful merges: - rust-lang#107978 (Correctly convert an NT path to a Win32 path in `read_link`) - rust-lang#110436 (Support loading version information from xz tarballs) - rust-lang#110791 (Implement negative bounds for internal testing purposes) - rust-lang#110874 (Adjust obligation cause code for `find_and_report_unsatisfied_index_impl`) - rust-lang#110908 (resolve: One more attempt to simplify `module_children`) - rust-lang#110943 (interpret: fail more gracefully on uninit unsized locals) - rust-lang#111062 (Don't bail out early when checking invalid `repr` attr) - rust-lang#111069 (remove pointless `FIXME` in `bootstrap::download`) - rust-lang#111086 (Remove `MemEncoder`) - rust-lang#111097 (Avoid ICEing miri on layout query cycles) - rust-lang#111112 (Add some triagebot notifications for nnethercote.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
MemEncoder
only has one non-test use, andFileEncoder
would be more appropriate there anyway.r? @cjgillot