-
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
Only do sanity check with debug assertions on #51658
Conversation
The change looks fine to me, though I don't have review privileges so you should probably ask someone else as well. I don't know why the instruction count would change (particularly by such a large amount) if this code isn't executed, as you say. But if it helps, might as well land it! |
Presumably r? @nikomatsakis or @eddyb |
How exactly did you get this measurement? I just did a local benchmarking run of |
Yes the regression is very likely elsewhere. I just wanted to get this fix out of the way. I came to the conclusion that this code could be relevant by looking at what code transitively calls this function, and it's a lot. Weird that you are not seeing the change. I ran it multiple times to ensure that the value doesn't change. Note that I used stage 1 because I didn't want to wait for stage 2. But as I said this doesn't improve perf in non-check cases, so I'm not sure what's going on |
What exactly did you run? Are you using the rustc-perf harness? |
yes I ran rustup nightly vs stage1 |
@bors try |
⌛ Trying commit d145a9539ae0643ddc6c516c3847e62d92033e88 with merge 41d23dc3c8502ec880cb8a06f0c24e00adbf2ea0... |
The change seems ... fine, though I might rather keep an |
@bors retry |
⌛ Trying commit d145a9539ae0643ddc6c516c3847e62d92033e88 with merge f62ad42dd18ad2aeea92affe2e927ba808410683... |
@bors r- try- retry The try build is complete but we've restarted bors and got the states confused. |
@Mark-Simulacrum perf is requested |
Perf queued. |
@Mark-Simulacrum perf available now? |
OK, seems like a wash by and large. |
@oli-obk maybe just remove the weird |
Done. |
@bors r+ |
📌 Commit a693c92 has been approved by |
@bors rollup |
Only do sanity check with debug assertions on r? @nnethercote I'm slighty confused. These changes address code that the `unused-warnings` benchmark doesn't go through, yet I see a 5% improvement to nightly on the `check` run, and no improvement on the other runs. Maybe this change allows unrelated code in the same function to be better optimized?
Rollup of 7 pull requests Successful merges: - #49987 (Add str::split_ascii_whitespace.) - #50342 (Document round-off error in `.mod_euc()`-method, see issue #50179) - #51658 (Only do sanity check with debug assertions on) - #51799 (Lower case some feature gate error messages) - #51800 (Add a compiletest header for edition) - #51824 (Fix the error reference for LocalKey::try_with) - #51842 (Document that Layout::from_size_align does not allow align=0) Failed merges: r? @ghost
r? @nnethercote
I'm slighty confused. These changes address code that the
unused-warnings
benchmark doesn't go through, yet I see a 5% improvement to nightly on thecheck
run, and no improvement on the other runs.Maybe this change allows unrelated code in the same function to be better optimized?