-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc_serialize: make assert more informative. #91655
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
This code was recently changed in #91407 |
@bors r+ rollup |
📌 Commit 90e7f49 has been approved by |
@bors rollup=never - potentially perf sensitive |
The use of |
@bors r- |
@bors try @rust-timer queue I think we should verify (if we haven't yet) whether it's actually a perf hit, first. |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 90e7f49 with merge dcf1ec9f0d09e1f0fe4f36e1a0224097753a8ed4... |
I didn't directly verify the impact of the change, but the post-PR perf run looks ~0.1% better than the perf run before the review changes. I am a tiny bit annoyed to be told to do one thing to see a PR undoing it.
I agree with the original review comment here:
To explain: I haven't looked at the |
Sorry, I did not mean to discredit any of your work. I just saw the "assertion failure x == y" on my screen and though "Huh, that does not tell a lot" so I patched it locally to see what was going on, and also made a pr because why not. About the |
Looking at godbolt, it seems that Still curious about the actual perf result though. :) |
The value is not calculated, it is a constant. It can't be off by one.
Well, any value other than the expected constant would indicate that the sentinel byte itself is missing. Which value you happen to end up seeing in this place would depend on what comes next after the string in that particular data structure that triggers the assert first.
My annoyance only stems from the left hand not knowing what the right hand was doing. Which can happen, doesn't make it not annoying. I'm not seeing it as an attack on my work, just... suboptimal communication, a bit of unnecessary friction, that's all. |
☀️ Try build successful - checks-actions |
Queued dcf1ec9f0d09e1f0fe4f36e1a0224097753a8ed4 with parent 4459e72, future comparison URL. |
Finished benchmarking commit (dcf1ec9f0d09e1f0fe4f36e1a0224097753a8ed4): comparison url. Summary: This benchmark run did not return any relevant changes. 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. @bors rollup=never |
#91650 (comment)
Make sure it prints the left/right values when it fails.