Repository navigation
Reuse specialization demand with a pass-local worklist - #1547
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c76a2d6ac1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
Specialization-demand queries repeatedly inspect overlapping callees, overrides and class members. Reuse their facts in a pass-local dependency worklist, then discard it before specialization mutates bodies.
Function facts and relevant-node indexes validate
modificationCount(); referenced implementations, overrides, members and superclasses are checked against identity snapshots. Queries validate newly introduced dependencies before returning. Callers no longer notify the cache of changes.Benchmarks of the version-validated implementation (
835fd3a)Nine measured pairs per map after three warm-up rounds, rotating both algorithms in the same JVM on real Lua RunMap builds. Windows x64, Zulu Java 27, 4 GiB heap, ParallelGC, optional optimizations disabled. The worklist code is from the reviewed head; the surrounding benchmark compiler baseline is
9893fb9ac(includes #1542). JFR and counters were off during timing.Castle specialization savings range from -70 to +1,321 ms; Zombie from -175 to +155 ms. Whole-request ranges are -643 to +4,712 ms and -198 to +687 ms. Castle retains a useful phase improvement; Zombie is noisy and approximately neutral. Whole-request figures include movement in untouched phases and are not exact causal estimates. Paired savings are medians of within-round differences, not differences between independent medians.
All 56 new map requests emitted identical Lua between algorithms, including both source states and fresh-model oracles. The original trials also matched across 112 requests. The earlier 49% / 611 ms Castle result belongs to the explicit-notification prototype and does not describe this reviewed implementation.
The committed report and six historical CSVs preserve the original investigation. The completed rebenchmark below supersedes that report's publication-time pending-timing note. No code changed after review to add these results.
All nine measured pairs per map, milliseconds
For each map, odd rounds use the edited body and even rounds the original. Exact output SHA-256 values match the historical CSVs for the same source state; all four fresh-model oracles per map match as well.
Validation and review
git diff --checkpasses.835fd3awith no new findings. The original modification-count finding is fixed and resolved; two complete snapshots over 60 seconds apart were stable.The earlier scope-scan optimization and profiling instrumentation are excluded from this PR's production diff. No new dependency or platform-specific production code. Local tests/benchmarks ran on Windows; CI covers Ubuntu. macOS timings and in-game execution remain unverified.