[Enhancement] Split cast/agg template-cartesian TUs to cut compile time - #76458
Conversation
Several expression/aggregate factory TUs were dominated by large 2-D template
cartesians (arg-type x ret-type / from-type x to-type), making them among the
slowest single translation units in the BE build. Split each, behavior-preservingly,
across parallel TUs: move the classes/templates/macros into a shared _tpl.hpp and
distribute the cartesian over group .cpp files, with the original file routing by
one type dimension.
- aggregate_resolver_avg: split out sum_map -> aggregate_resolver_sum_map{1,2,3}.cpp
(641s -> 201 + 150/154/117s)
- case_expr: result-type cartesian -> case_expr_g{1,2,3}.cpp
(536s -> 14 + 203/176/157s)
- aggregate_resolver_minmaxany: split out max_by/min_by ->
aggregate_resolver_maxminby{1,2,3}.cpp (346s -> 187 + 90/90/76s)
- cast_expr: primitive from-type x to-type cartesian -> cast_expr_g{1,2,3}.cpp
(258s -> 79 + 87/88/72s)
Behavior-preserving (identical type coverage). The wall-clock pole of each TU drops
~60%; total CPU rises slightly from per-group header re-parse. Isolated compile times
measured without PCH.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Module-risk briefing for Codex reviewThis is review focus, not a finding list. Validate against the diff. High-confidence risks
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]❌ fail : 1059 / 1358 (77.98%) file detail
|
Why I'm doing:
Several expression/aggregate factory TUs were dominated by large 2-D template cartesians (arg-type x ret-type / from-type x to-type), making them among the slowest single translation units in the BE build. Split each, behavior-preservingly, across parallel TUs: move the classes/templates/macros into a shared _tpl.hpp and distribute the cartesian over group .cpp files, with the original file routing by one type dimension.
aggregate_resolver_maxminby{1,2,3}.cpp (346s -> 187 + 90/90/76s)
Behavior-preserving (identical type coverage). The wall-clock pole of each TU drops ~60%; total CPU rises slightly from per-group header re-parse. Isolated compile times measured without PCH.
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: