Skip to content
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

interpret: get_ptr_alloc_mut: lookup allocation only once #130148

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 9, 2024

I don't think this will make a big perf difference, but it makes this function symmetric with get_ptr_alloc -- and it's always nice to successfully solve a borrow checker puzzle like this. ;)

@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2024

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

RalfJung commented Sep 9, 2024

This is probably pointless, I don't think our ctfe-stress test even does many writes...
@rust-timer queue
@bors try

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
…, r=<try>

interpret: get_ptr_alloc_mut: lookup allocation only once

I don't think this will make a big perf difference, but it makes this function symmetric with `get_ptr_alloc` -- and it's always nice to successfully solve a borrow checker puzzle like this. ;)
@bors
Copy link
Contributor

bors commented Sep 9, 2024

⌛ Trying commit 4e8ddbd with merge cc84819...

@bors
Copy link
Contributor

bors commented Sep 9, 2024

☀️ Try build successful - checks-actions
Build commit: cc84819 (cc848194add2182f402a65d443478051663979ba)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cc84819): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking 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
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-0.8%, -0.6%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (primary 4.8%)

This 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.

mean range count
Regressions ❌
(primary)
4.8% [4.8%, 4.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.8% [4.8%, 4.8%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 757.632s -> 757.094s (-0.07%)
Artifact size: 341.17 MiB -> 341.09 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 9, 2024
@saethlin
Copy link
Member

To save anyone else a few clicks, the benchmark that improves above has a huge static initializer. It does a lot of writes.

r=me when you fix the conflicts :)

@RalfJung
Copy link
Member Author

@bors r=saethlin

@bors
Copy link
Contributor

bors commented Sep 15, 2024

📌 Commit f16f09d has been approved by saethlin

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2024
@bors
Copy link
Contributor

bors commented Sep 15, 2024

⌛ Testing commit f16f09d with merge 1ae2688...

@bors
Copy link
Contributor

bors commented Sep 15, 2024

☀️ Test successful - checks-actions
Approved by: saethlin
Pushing 1ae2688 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 15, 2024
@bors bors merged commit 1ae2688 into rust-lang:master Sep 15, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 15, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1ae2688): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.2%, secondary -2.7%)

This 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.

mean range count
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) 3.2% [3.2%, 3.2%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 760.068s -> 759.207s (-0.11%)
Artifact size: 340.57 MiB -> 341.12 MiB (0.16%)

@RalfJung RalfJung deleted the interpret-get_ptr_alloc_mut branch September 21, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants