-
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
Reduce the cost of loading all built-ins targets #95202
Conversation
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit aeadc42389613ae25e868809e26100fa960da068 with merge f1bad32f32f5ed8240872cb387d09a3635f62297... |
☀️ Try build successful - checks-actions |
Queued f1bad32f32f5ed8240872cb387d09a3635f62297 with parent b9c4067, future comparison URL. |
Finished benchmarking commit (f1bad32f32f5ed8240872cb387d09a3635f62297): comparison url. Summary: This benchmark run shows 68 relevant regressions 😿 to instruction counts.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led 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 |
@petrochenkov Do you want me to try with |
@Urgau |
Before measuring the cost (hopefully negative) of replacing every |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 93a4d854318dcc9c758403213ebb77be98eaa02c with merge f2bca08ebf42b573bcacc3ae5a8dacabb8f03268... |
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
Queued f2bca08ebf42b573bcacc3ae5a8dacabb8f03268 with parent 903427b, future comparison URL. |
Finished benchmarking commit (f2bca08ebf42b573bcacc3ae5a8dacabb8f03268): comparison url. Summary: This benchmark run shows 68 relevant regressions 😿 to instruction counts.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led 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 |
The PR's title and description need to be updated. |
1424502
to
2191d2a
Compare
2191d2a
to
303611c
Compare
Unit tests in |
@@ -1107,6 +1104,8 @@ impl HasTargetSpec for Target { | |||
} | |||
} | |||
|
|||
type StaticCow<T> = Cow<'static, T>; |
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.
I don't think this adds much. It only saves 2 characters.
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.
I asked to add it in #95202 (comment) because it looks less noisy due to removing punctuation like '
and ,
even if it's only slightly shorter. (Not a strong opinion.)
303611c
to
1a1f5b8
Compare
Review comments addressed or responded. Commits squashed to only 4, but can squash to only 1 if you prefer. @rustbot ready |
@bors r+ |
📌 Commit 1a1f5b8 has been approved by |
⌛ Testing commit 1a1f5b8 with merge 8a8b80634e8c439c8b36e3b3729a5094606ae9cd... |
@bors retry (yield to rollup containing this pr) |
Rollup of 5 pull requests Successful merges: - rust-lang#95202 (Reduce the cost of loading all built-ins targets) - rust-lang#95553 (Don't emit non-asm contents error for naked function composed of errors) - rust-lang#95613 (Fix rustdoc attribute display) - rust-lang#95617 (Fix &mut invalidation in ptr::swap doctest) - rust-lang#95618 (core: document that the align_of* functions return the alignment in bytes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This PR started by measuring the exact slowdown of checking of well known conditional values.
Than this PR implemented some technics to reduce the cost of loading all built-ins targets.
cf. #82450 (comment)