RCA Perf: Perform aggregation in-place rather than returning new instances. - #3619
Merged
Stefan J. Wernli (swernli) merged 3 commits intoAug 24, 2026
Merged
Conversation
Stefan J. Wernli (swernli)
requested a review
from Ian Davis (idavis)
as a code owner
August 21, 2026 06:18
Stefan J. Wernli (swernli)
force-pushed
the
swernli/rca-perf-3
branch
2 times, most recently
from
August 21, 2026 17:37
6bab2a7 to
656516c
Compare
This improves RCA perf by avoiding frequent calls to `get` functions to query recently analyzed `ComputeKind` and instead keeps a cached "last analyzed" value that calling code outside of the visiter pattern can take from without having to query maps. This then allows the maps to be replaced by vectors of tuple that are pushed into and only converted into maps at the end of analysis. Note that `ApplicationInstance` structure is per-callable, so the total size of blocks, stmts, and exprs that are accumulated is relatively small.
…ances. This change updates the mechanism for aggreating runtime capabilities by having the `aggregate` and `aggregate_runtime_features` utilities update `self` in place rather than return a new instance. In practice, the new instance almost always replaced the old one.
Stefan J. Wernli (swernli)
force-pushed
the
swernli/rca-perf-3
branch
from
August 24, 2026 21:16
656516c to
2d1340e
Compare
Dima Fedoriaka (fedimser)
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change updates the mechanism for aggreating runtime capabilities by having the
aggregateandaggregate_runtime_featuresutilities updateselfin place rather than return a new instance. In practice, the new instance almost always replaced the old one.Stack created with GitHub Stacks CLI • Give Feedback 💬