-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Inline trivial (noop) flush calls #114194
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
It's always a little dodgy to add a bunch of inline on widely used types, so... @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 558f49d with merge 0c26b4912c0a4aa39d8f4a8600506e9d2b87e86f... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0c26b4912c0a4aa39d8f4a8600506e9d2b87e86f): comparison URL. Overall result: ✅ improvements - 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 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 sizeResultsThis 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.
Bootstrap: 649.942s -> 651.104s (0.18%) |
Yeah it's very hard to say if that's noise or not. It could go either way. |
LGTM! @bors r+ rollup |
…mpiler-errors Rollup of 5 pull requests Successful merges: - rust-lang#114194 (Inline trivial (noop) flush calls) - rust-lang#114257 (Avoid using `ptr::Unique` in `LinkedList` code) - rust-lang#114359 ([library/std] Replace condv while loop with `cvar.wait_while`.) - rust-lang#114402 (Fix documentation of impl From<Vec<T>> for Rc<[T]>) - rust-lang#114715 (Revert clippy lint [`filter_map_bool_then`]) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 5 pull requests Successful merges: - rust-lang#114194 (Inline trivial (noop) flush calls) - rust-lang#114257 (Avoid using `ptr::Unique` in `LinkedList` code) - rust-lang#114359 ([library/std] Replace condv while loop with `cvar.wait_while`.) - rust-lang#114402 (Fix documentation of impl From<Vec<T>> for Rc<[T]>) - rust-lang#114715 (Revert clippy lint [`filter_map_bool_then`]) r? `@ghost` `@rustbot` modify labels: rollup
At work I noticed that
writer.flush()?
didn't get optimized away in cases where the flush is obviously a no-op, which I had expected (well, desired).I went through and added
#[inline]
to a bunch of cases that were obviously noops, or delegated to ones that were obviously noops. I omitted platforms I don't have access to (some tier3). I didn't do this very scientifically, in cases where it was non-obvious I left#[inline]
off.