-
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
Use a bitset instead of a hash map in HIR ID validator #98841
Conversation
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 643f95505e4c72f631fd5b58e15c9302cfaf86dd with merge b371755aa596a2e3bb87d606d36d30cda43f8cc2... |
Might also be worth trying an IntervalSet if we expect mostly contiguous insertion (I don't know if we do). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I checked the IDs and its usually contiguous in chunks, based on the visit order. So something like |
Should we just gate all this code on |
Yeah I was also thinking that. It's just a sanity check (AFAIK), but consumes ~1% instructions for some incr-patched builds. |
643f955
to
2a57e5e
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 2a57e5e with merge 78eff9d482d3030a75548def878b6cf05c760e7e... |
☀️ Try build successful - checks-actions |
Queued 78eff9d482d3030a75548def878b6cf05c760e7e with parent d46c728, future comparison URL. |
Finished benchmarking commit (78eff9d482d3030a75548def878b6cf05c760e7e): 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. 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 |
Nice. Let's see how much it improves if we turn it off completely. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 928c172 with merge 032a2b3e8984e4f00fd8530ba03b516eb07325fa... |
☀️ Try build successful - checks-actions |
Queued 032a2b3e8984e4f00fd8530ba03b516eb07325fa with parent 9c9ae85, future comparison URL. |
Finished benchmarking commit (032a2b3e8984e4f00fd8530ba03b516eb07325fa): 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. 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 |
r? @cjgillot |
@bors r+ |
📌 Commit 928c172 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c461f7a): 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 |
@Kobzol for posterity, could you adjust the PR description to reflect that this also disables validation entirely unless debug_assertions is on (so essentially only for local rustc development)? |
@Mark-Simulacrum Done. |
The hashset insertion was slightly hot in incr patched runs, but it seems unnecessary to use a hashset here, as it just checks that a dense set of N integers was seen.
This PR does two things:
debug_assertions
is enabled (so it's disabled in fully optimized builds now).