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

Lazify TargetOptions::*link_args fields #127992

Closed
wants to merge 2 commits into from

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jul 19, 2024

This PR lazify the link args by introducing MaybeLazy, a 3-way lazy container (borrowed, owned and lazied state).

Split from #122703
r? @petrochenkov

@rustbot rustbot added O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) 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 Jul 19, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 19, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

@Urgau
Copy link
Member Author

Urgau commented Jul 19, 2024

@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 Jul 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 19, 2024
Lazify `TargetOptions::*link_args` fields

This PR lazify the link args by introducing `MaybeLazy`, a 3-way lazy container (borrowed, owned and lazied state).

Split from rust-lang#122703
r? `@petrochenkov`
@bors
Copy link
Contributor

bors commented Jul 19, 2024

⌛ Trying commit 990db03 with merge f36d603...

@bors
Copy link
Contributor

bors commented Jul 19, 2024

☀️ Try build successful - checks-actions
Build commit: f36d603 (f36d60300ac847dfce3fef9a95195cb8788e7942)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f36d603): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@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.3% [0.2%, 0.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.1%] 11
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 6.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)
- - 0
Regressions ❌
(secondary)
6.8% [3.0%, 10.4%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 767.644s -> 769.722s (0.27%)
Artifact size: 328.87 MiB -> 328.89 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 20, 2024
@petrochenkov
Copy link
Contributor

I'm going to make a hard decision and close this as well.
There are some perf improvements, but they are not sufficient to compensate for the massive uglification of interfaces.

My apologies for the wasted effort, I'm sure this was pretty annoying to implement due to the sheer number of the target specs needing modifications.

I'm not if we could recycle these patches later.
If const eval is advanced enough to produce target specs at compile time, then it will support const allocations, which means that building vectors and maps will be a cheap compile time activity, and that laziness will not be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) perf-regression Performance regression. 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.

5 participants