-
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
Remove thread-local IGNORED_ATTRIBUTES
.
#98084
Remove thread-local IGNORED_ATTRIBUTES
.
#98084
Conversation
It's just a copy of the read-only global `ich::IGNORED_ATTRIBUTES`, and can be removed without any effect.
@bors rollup=always |
Thanks, @nnethercote! That was probably meant as on optimization (HashMap vs linear list lookup). But if it doesn't affect performance, let's remove it. @bors r+ |
📌 Commit a280162 has been approved by |
static IGNORED_ATTRIBUTES: FxHashSet<Symbol> = compute_ignored_attr_names(); | ||
} | ||
IGNORED_ATTRIBUTES.with(|attrs| attrs.contains(&name)) | ||
ich::IGNORED_ATTRIBUTES.contains(&name) |
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.
Previously this would do a HashSet lookup in O(1)
. Now it does a Vec
search in O(n)
.
Let's make sure we get a clean perf run for this, so we can revert if necessary: We could also consider using a lazy static hashmap here. |
⌛ Testing commit a280162 with merge 8beb2bd30e3ef75759d48d465c57aae0893d02ae... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry |
Let's do a perf run ahead of time. @bors r- |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a280162 with merge 749b0e41927602c22d2cd581e99f43f94176e549... |
☀️ Try build successful - checks-actions |
Queued 749b0e41927602c22d2cd581e99f43f94176e549 with parent 1f34da9, future comparison URL. |
Finished benchmarking commit (749b0e41927602c22d2cd581e99f43f94176e549): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
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 may lead to changes in compiler perf. @bors rollup=never Footnotes |
Perf results are neutral. @bors r=michaelwoerister |
📌 Commit a280162 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ebe184a): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The previous perf run was neutral. The post-merging one had two regressions, but I am confident they're just noise. A real regression would show up more consistently, e.g. multiple regressions on a single benchmark. @rustbot perf-regression-triaged |
It's just a copy of the read-only global
ich::IGNORED_ATTRIBUTES
, andcan be removed without any effect.
r? @michaelwoerister