Improve the forcing/promotion functions in DepKindVTable#153122
Improve the forcing/promotion functions in DepKindVTable#153122Zalathar wants to merge 4 commits intorust-lang:mainfrom
DepKindVTable#153122Conversation
|
This is not fully-baked yet, but I want to run PR CI and perf to check for unanticipated problems. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Improve the forcing/promotion functions in `DepKindVTable`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (dff6afa): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.7%, secondary 4.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.1%, secondary -8.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 492.161s -> 478.802s (-2.71%) |
2aba5f0 to
3b6451e
Compare
|
r? nnethercote (or compiler) |
|
Fantastic perf results! I would like to eliminate @bors r+ |
Right now, So I currently don't see a way to usefully put a query-vtable pointer into |
| /// True if a key can _potentially_ be recovered from a key fingerprint | ||
| /// with this style. | ||
| /// | ||
| /// For some key types, recovery is possible but not guaranteed. |
There was a problem hiding this comment.
This seems a bit misleading. Do we have any types where recovery will fail?
There was a problem hiding this comment.
Yes, it's possible for DefId to fail recovery, for example.
I verified this by adding a panic to the failure path of one of the try_recover_key calls, and then running x test incremental.
This comment has been minimized.
This comment has been minimized.
- `force_from_dep_node` → `force_from_dep_node_fn` - `try_load_from_disk_cache` → `promote_from_disk_fn` This commit also inlines the wrapper function around `promote_from_disk_fn`.
3b6451e to
08df254
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Rebased to fix trivial conflict. @bors r=nnethercote |
This is a bundle of changes to the two function pointers in
DepKindVTablethat are responsible for forcing dep nodes, or promoting disk-cached values from the previous session into memory.The perf improvements to incr-unchanged and incr-patched are likely from skipping more of the “promotion” plumbing for queries that never cache to disk.