-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add #[inline]
to BTreeMap::new
constructor
#122099
Conversation
This seems unobjectionable but: @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Add `#[inline]` to `BTreeMap::new` constructor This PR add the `#[inline]` attribute to `BTreeMap::new` constructor as to make it eligible for inlining. <details> For some context: I was profiling `rustc --check-cfg` with callgrind and due to the way we currently setup all the targets and we end-up calling `BTreeMap::new` multiple times for (nearly) all the targets. Adding the `#[inline]` attribute reduced the number of instructions needed. </details>
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (55e9de3): comparison URL. Overall result: ❌ regressions - 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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 644.65s -> 646.164s (0.23%) |
I feel like I don't know how to read the perf runes again, today. |
I'm surprised @bors r+ rollup |
Add `#[inline]` to `BTreeMap::new` constructor This PR add the `#[inline]` attribute to `BTreeMap::new` constructor as to make it eligible for inlining. <details> For some context: I was profiling `rustc --check-cfg` with callgrind and due to the way we currently setup all the targets and we end-up calling `BTreeMap::new` multiple times for (nearly) all the targets. Adding the `#[inline]` attribute reduced the number of instructions needed. </details>
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118623 (Improve std::fs::read_to_string example) - rust-lang#119365 (Add asm goto support to `asm!`) - rust-lang#120608 (Docs for std::ptr::slice_from_raw_parts) - rust-lang#121885 (Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attribute to inner type.) - rust-lang#121938 (Fix quadratic behavior of repeated vectored writes) - rust-lang#122099 (Add `#[inline]` to `BTreeMap::new` constructor) - rust-lang#122143 (PassWrapper: update for llvm/llvm-project@a3319371970b) Failed merges: - rust-lang#122076 (Tweak the way we protect in-place function arguments in interpreters) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#118623 (Improve std::fs::read_to_string example) - rust-lang#119365 (Add asm goto support to `asm!`) - rust-lang#120608 (Docs for std::ptr::slice_from_raw_parts) - rust-lang#121832 (Add new Tier-3 target: `loongarch64-unknown-linux-musl`) - rust-lang#121938 (Fix quadratic behavior of repeated vectored writes) - rust-lang#122099 (Add `#[inline]` to `BTreeMap::new` constructor) - rust-lang#122103 (Make TAITs and ATPITs capture late-bound lifetimes in scope) - rust-lang#122143 (PassWrapper: update for llvm/llvm-project@a3319371970b) Failed merges: - rust-lang#122076 (Tweak the way we protect in-place function arguments in interpreters) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122099 - Urgau:btreemap-inline-new, r=Amanieu Add `#[inline]` to `BTreeMap::new` constructor This PR add the `#[inline]` attribute to `BTreeMap::new` constructor as to make it eligible for inlining. <details> For some context: I was profiling `rustc --check-cfg` with callgrind and due to the way we currently setup all the targets and we end-up calling `BTreeMap::new` multiple times for (nearly) all the targets. Adding the `#[inline]` attribute reduced the number of instructions needed. </details>
This PR add the
#[inline]
attribute toBTreeMap::new
constructor as to make it eligible for inlining.For some context: I was profiling
rustc --check-cfg
with callgrind and due to the way we currently setup all the targets and we end-up callingBTreeMap::new
multiple times for (nearly) all the targets. Adding the#[inline]
attribute reduced the number of instructions needed.