-
Notifications
You must be signed in to change notification settings - Fork 192
refactor: Extract the cycle branches from fetch and maybe_changed_after
#955
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
refactor: Extract the cycle branches from fetch and maybe_changed_after
#955
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
fetch and maybe_changed_afterfetch and maybe_changed_after
b19ec4f to
d75390e
Compare
CodSpeed Performance ReportMerging #955 will not alter performanceComparing Summary
|
d75390e to
3bdf4ba
Compare
carljm
left a comment
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.
Looks good!
| } | ||
| } | ||
|
|
||
| QueryOriginRef::Assigned(_) => { |
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.
This change is just to put the more frequent match arm first?
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.
Yeah. I find this also helps with readability because I can reason about the common case first
3bdf4ba to
8e0ee63
Compare
and mark them as cold. I also reordered some other match statements so that the most likely branches come first.
This hopefully helps the compiler to generate more efficient code for the common case (no cycle)