Repository navigation
js, python, csharp rules: the profiled hot shapes, one language at a time - #1863
Merged
swapnilpaliwal-sd merged 3 commits intoOct 8, 2026
Merged
Conversation
…site The souffle profile on a 2,250-file subject put 9.78s of a 36s solve — the single hottest rule — in call_chain_summary producing 7 rows: driven by call_class rows, the aggregate re-counted a tier once per SITE in it. call_class_kind(cls) drives it once per DISTINCT tier, the same fix the python engine's site_class_kind carries. Serial solve on identical facts: 36s -> 22s (-39%), every output relation sorted-identical. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
… attribute prefixes adopted, the mro lookup hoisted The round-two profile on a django-sized subject named three shapes, all familiar: - root_expr_at(p, rc, scope, line, e) holds each context's root expression WITH the keys the statement pairings join on. Written inline, iter_pair and with_pair each enumerated one side's roots and probed scope and span per candidate — 22s between them for ~6K rows; each pairing is now one indexed join. - five attribute-access clauses still carried the expr_node/expr_parent prefix inline — the context-test variants (STORE / not-STORE / not-callee) that round two's regex missed because atoms sit between the prefix parts. They now probe attr_access and keep their context atoms: instance_attr_method_value, expr_denotes_method, element_type_of and kin, ~27s of the profile. - replaced_method_of(p, c, n, def) hoists mro_lookup_decorated's pure-syntax member lookup below the fixpoint (12s re-derived every iteration for 783 rows). Gate on identical staged django facts, same machine: serial solve 193s -> 124s (-33%; cumulative with rounds one and two, 885s -> 124s, 7.1x), every output relation sorted-identical. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
The souffle profile on a 257MB app put 3.1 of 6 minutes in ONE clause: carry_step anchored on expr_binding visited every USE of every variable and re-scanned the assignments for each. var_assigned_value(v, c) enumerates the assignments once, keyed by the variable, and carry_step is one indexed join. state_leak's instance-write clause crossed every (type, entry) pair with every assignment in the program — 33s for two rows; func_written_onto (t, f, owner) enumerates the assignment side once, keyed (type, func). Gate on identical staged facts, same machine: serial solve 280s -> 81s (-71%), every output relation sorted-identical. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
October 8, 2026 11:23
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.
The profiling sweep (
AXIOM_DL_PROFILE, same instrument as the TS and Java rounds) applied to the three remaining languages, every change gated by sorted-identical output relations on identical staged facts plus the language's suite leg:carry_stepanchored on every variable USE and re-scanned all assignments per use (3.1 of 6 minutes, half the profile);var_assigned_value(v,c)keys it.state_leakcrossed every (type, entry) with every assignment (33s for 2 rows);func_written_onto(t,f,owner)keys it.root_expr_atmaterializes the statement-pairing key (iter/with, 22s); five attribute-prefix clauses round two's regex missed (context atoms mid-prefix) now probeattr_access(~27s);replaced_method_ofhoists the mro member lookup below the fixpoint (12s).call_chain_summaryre-counted each tier once per site (9.8s of 36s for 7 rows);call_class_kinddrives it once per distinct tier — the pythonsite_class_kindfix ported.With the parallel solve (PR #1861) on top, estimated big-subject parallel solves land at roughly: JS ~30s (was 449s at session start), Python ~45s (was 1,445s cloud), C# ~11s.
Remaining profile tails per language are flat after these (≤5s/rule); next-largest items noted in the dogfood log (
extension_matchC#,expr_denotes_bound_methodpython).