Skip to content

RCA Perf: Perform aggregation in-place rather than returning new instances. - #3619

Merged
Stefan J. Wernli (swernli) merged 3 commits into
swernli/rca-perf-1from
swernli/rca-perf-3
Aug 24, 2026
Merged

RCA Perf: Perform aggregation in-place rather than returning new instances.#3619
Stefan J. Wernli (swernli) merged 3 commits into
swernli/rca-perf-1from
swernli/rca-perf-3

Conversation

@swernli

Copy link
Copy Markdown
Contributor

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.


Stack created with GitHub Stacks CLIGive Feedback 💬

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.
@swernli
Stefan J. Wernli (swernli) added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit d492648 Aug 24, 2026
16 of 26 checks passed
Base automatically changed from swernli/rca-perf-2 to swernli/rca-perf-1 August 24, 2026 23:21
@swernli
Stefan J. Wernli (swernli) deleted the swernli/rca-perf-3 branch August 24, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants