-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Bypass the varint path when encoding InitMask #110343
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 610a9152e521fc1239e47d6b535f29a8f41f826d with merge 07959ce106e5ec22c1d30c15040752c0790e3587... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (07959ce106e5ec22c1d30c15040752c0790e3587): comparison URL. Overall result: ❌✅ regressions and improvements - 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
r? @lqd |
79467e3
to
ada897b
Compare
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.
Awesome.
I now wonder whether the const allocations' bytes themselves really need to be LEB128-encoded as well, and what would the time and size cost/gains be if we didn't. (But probably they already aren't, they shouldn't and to be clear I haven't checked)
r=me with the typo suggestion squashed
compiler/rustc_middle/src/mir/interpret/allocation/init_mask.rs
Outdated
Show resolved
Hide resolved
fn encode(&self, encoder: &mut E) { | ||
encoder.emit_usize(self.blocks.len()); | ||
for block in &self.blocks { | ||
encoder.emit_raw_bytes(&block.to_le_bytes()); |
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.
Just wanted to note: I'm not familiar with the endianness rules for encoding/decoding, I had idly wondered before if we should prefer native endianness in incr data, but I think we use LE everywhere so 👍 .
ada897b
to
69279c0
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (56e28e9): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @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.
|
Largest regressions are in cranelift-codegen and keccak. Cachegrind diff for keccak looks like this (which should not surprise anyone):
This PR doesn't modify any of the related code. This looks like more optimization instability to me. |
|
On second thought, I just saw this, so perhaps the |
The
Which also seems pretty far away from what this PR is doing. So yeah, I agree. |
Marking this as triaged since this was identified as most likely being noise. @rustbot label: +perf-regression-triaged |
The data in a
InitMask
is stored asu64
but it is a large bitmask (not numbers) so varint encoding doesn't make sense.