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

Use Box<[T]> for ProcessResult::Changed #121355

Closed
wants to merge 1 commit into from

Conversation

GnomedDev
Copy link
Contributor

Using a boxed slice here should save moving around the capacity when it's equal, and maybe save some memory as this automatically shrink_to_fits.

@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 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 Feb 20, 2024
@compiler-errors
Copy link
Member

@bors try @rust-timer queue

@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 Feb 20, 2024
@bors
Copy link
Contributor

bors commented Feb 20, 2024

⌛ Trying commit f9e71fc with merge 5140237...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2024
Use Box<[T]> for ProcessResult::Changed

Using a boxed slice here should save moving around the capacity when it's equal, and maybe save some memory as this automatically `shrink_to_fit`s.
@bors
Copy link
Contributor

bors commented Feb 20, 2024

☀️ Try build successful - checks-actions
Build commit: 5140237 (5140237979808f031043c5a318f5ce8beb0564fe)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5140237): 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)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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)
- - 0
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-3.0%, -2.2%] 2
All ❌✅ (primary) - - 0

Cycles

Results

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)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 641.255s -> 639.801s (-0.23%)
Artifact size: 308.58 MiB -> 308.60 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 21, 2024
@compiler-errors
Copy link
Member

Probably noise. I don't think we should land this, since it just adds extra complexity.

@GnomedDev
Copy link
Contributor Author

I don't see how this is extra complexity? Boxed slices are less complex than Vecs.

@estebank
Copy link
Contributor

estebank commented May 2, 2024

@compiler-errors the only metric affected does have a >1x significance factor, and the over all changes seem slightly annoying simply because vec is such a common construct, but it doesn't seem worth it to block this due to that?

@GnomedDev apologies for the delay in reviewing this again, it fell of my radar.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm +1, but want to discuss and arrive to the consensus with @compiler-errors

@compiler-errors
Copy link
Member

compiler-errors commented May 2, 2024

Thanks, but I don't think this is worth the change. If this were actually significantly affecting the processing of obligations in fulfillment, then we would see more than a single benchmark improve here; afaict, there's nothing particularly special about incr-full wrt fulfillment.

@GnomedDev GnomedDev deleted the process-result-box branch May 2, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants