-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use &IndexSlice
instead of &IndexVec
where possible
#109819
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
77c9298
to
b47b43b
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit b47b43b4f22bfb374597a0c8e8b683970867776d with merge 0e80712d44f9e728430eba2130bb30f813c99ad1... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0e80712d44f9e728430eba2130bb30f813c99ad1): 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.
|
r? @WaffleLapkin |
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
(Update was just a rebase atop #109849, since it touched a couple of the same places.) |
@@ -116,7 +130,7 @@ impl<I: Idx, T> IndexVec<I, T> { | |||
} | |||
|
|||
#[inline] | |||
pub fn from_elem<S>(elem: T, universe: &IndexVec<I, S>) -> Self | |||
pub fn from_elem<S>(elem: T, universe: &IndexSlice<I, S>) -> Self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have documentation here, I don't really get why/how you'd use this method...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sent as PR #109913
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bf41e75): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression 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.
|
Doc-comment `IndexVec::from_elem` and use it in a few more places Since this PR is a reply to rust-lang#109819 (comment), r? `@WaffleLapkin`
Doc-comment `IndexVec::from_elem` and use it in a few more places Since this PR is a reply to rust-lang#109819 (comment), r? ``@WaffleLapkin``
Update the toolchain to use nightly-2023-04-16. Changes were related to the following changes to the toolchain: - rust-lang/rust#108944 - rust-lang/rust#108148 - rust-lang/rust#108471 - rust-lang/rust#109358 - rust-lang/rust#109849 - rust-lang/rust#109819 - rust-lang/rust#109718 - rust-lang/rust#109092 - rust-lang/rust#108856 - rust-lang/rust#105613 - rust-lang/rust#103042 - rust-lang/rust#109716 - rust-lang/rust#108340 - rust-lang/rust#102906 - rust-lang/rust#98112 - rust-lang/rust#108080
All the same reasons as for
[T]
: more general, less pointer chasing, and&mut IndexSlice
emphasizes that it doesn't change length.r? @ghost