-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Improve merge_from_succ
#68790
Improve merge_from_succ
#68790
Conversation
This function has a variable `changed` that is erroneously used for two related-but-different purpose: - to detect if the current element has changed; - to detect if any elements have changed. As a result, its use for the first purpose is broken, because if any prior element changed then the code always thinks the current element has changed. This is only a performance bug, not a correctness bug, because we frequently end up calling `assign_unpacked` unnecessarily to overwrite the element with itself. This commit adds `any_changed` to correctly distinguish between the two purposes. This is a small perf win for some benchmarks.
This is a small perf win.
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit d62b6f2 with merge e7835ee33c2030551c58f51ce5ac1f594bfc48d5... |
Some local results:
|
☀️ Try build successful - checks-azure |
Queued e7835ee33c2030551c58f51ce5ac1f594bfc48d5 with parent 8f49d46, future comparison URL. |
Finished benchmarking try commit e7835ee33c2030551c58f51ce5ac1f594bfc48d5, comparison URL. |
@bors r=nikomatsakis |
📌 Commit d62b6f2 has been approved by |
⌛ Testing commit d62b6f2 with merge add3e5105559c64935116c58ee40a635ce39ed8f... |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
Looks like the failure was an infra problem, unrelated to the commits. @bors retry |
…, r=nikomatsakis Improve `merge_from_succ` A couple of small performance wins. r? @nikomatsakis
…, r=nikomatsakis Improve `merge_from_succ` A couple of small performance wins. r? @nikomatsakis
…, r=nikomatsakis Improve `merge_from_succ` A couple of small performance wins. r? @nikomatsakis
Rollup of 8 pull requests Successful merges: - #68762 (Strip unnecessary subexpression) - #68790 (Improve `merge_from_succ`) - #68809 (Make more arithmetic functions unstably const) - #68832 (Clean up E0264, E0267 and E0268 explanations) - #68840 (On suggesting `#![recursion_limit = "X"]`, note current crate name) - #68846 (doc fix on doc attribute) - #68851 (Fix issue number of `capacity` method) - #68858 (Merge item id stable hashing functions) Failed merges: r? @ghost
Rollup of 8 pull requests Successful merges: - #68762 (Strip unnecessary subexpression) - #68790 (Improve `merge_from_succ`) - #68809 (Make more arithmetic functions unstably const) - #68832 (Clean up E0264, E0267 and E0268 explanations) - #68840 (On suggesting `#![recursion_limit = "X"]`, note current crate name) - #68846 (doc fix on doc attribute) - #68851 (Fix issue number of `capacity` method) - #68858 (Merge item id stable hashing functions) Failed merges: r? @ghost
A couple of small performance wins.
r? @nikomatsakis