Skip to content

perf(scheduler): avoid redundant change tracking - #3013

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/perf/rtlmeter-change-tracking/avoid-redundant-change-tracking--a8c21505
Nov 2, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/perf/rtlmeter-change-tracking/avoid-redundant-change-tracking--a8c21505

Conversation

@tignear

@tignear tignear commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Acyclic process bodies run only at their first output projection, but settle planning charged every projection for the complete body and tracked all its reads and writes again. This generated partitions and change watches for work that is never executed, keeping large sets of old values live across the real body.

Plan those reads, writes and costs only at the executing projection. Keep cyclic components and guarded regions unchanged. Remove the full flag-array population count at every settle: when individual flags are all set, their own guards already select every partition; an untracked raw view still forces a full settle.

For larger event sets, evaluate stable clock edges in 64-bit value/mask batches. For SV sensitivity lists without occurrence counters, check four inputs at a time, stop at the first change, and refresh all baselines at initialization or a detected change. Preserve four-state X/Z transitions, ordinary event-control startup, and post-body rearming.

Validation: 621 unit tests and 9,879 behavioral tests passed, with 20 existing skips. The common suite covers native/native-parallel, Cranelift/Cranelift-parallel and Wasm, with focused interpreter and differential scheduler coverage. Added coverage for 70 mixed edges crossing a word boundary and a long sensitivity list with early/late changes, repeated values and X/Z-only changes. The shared sensitivity case passes Icarus; Verilator's adapter reports its four-state expectations unsupported. Affected all-target Clippy, formatting and diff checks passed.

E902/CoreMark four-state steady throughput now exceeds xezim in both long run orders on this machine. These are fresh measurements of this source tree on top of the merged #3003–#3005 stack, using one frozen binary.

Run order Celox clocks/CPU-s xezim clocks/CPU-s CPU throughput gain Wall throughput gain
Celox first 33148 30482 8.75% 8.74%
xezim first 32605 30704 6.19% 6.19%

Each engine completed 2,359,876 clocks with matching CoreMark CRCs. After warmup, alternate 34 matching 65,536-clock intervals (131,072..2,359,296); whole-window throughput uses process CPU time or wall time excluding controlled pauses. Both engines are pinned to logical CPU 8 on a Ryzen 7 9800X3D. No own builds or tests run during measurements; other machine load is uncontrolled. The Celox-first run had 12 MiB of huge-page-backed executable memory; the xezim-first run had ordinary pages and still won.

RTLmeter revision 4fdd6c3fd154e9b99d3a9d713cf3f4977e284f94, E902/CoreMark +iterations=5 +max_cycles=1000000000. Celox: heliodor-dev profile, native O2, four-state, one thread, --unlimited --no-checkpoint-on-signal --report. Comparison: xezim 0.11.4, binary SHA256 afbe25c3906450a35335fb65da2ff6212f0b3e654a0f16c11a2f28a7c29d4e65. Both use the same progress display once per 65,536 clocks in the existing negedge utility process, with no added RTL process and no two-state fallback.

This qualifies post-JIT throughput for E902/CoreMark on this host. JIT-inclusive total time remains longer for Celox; these are instrumented measurements, not a claim about every RTLmeter design or unmodified release scores.

Measured source tree: 39f916fbacbd5f76a9d476438b080cb755de5f2d; Celox binary SHA256: cf3cbb2eda57808751f79fd93f7387eacf1b97d7af9aebbe8c9bcbd189e03e82. Full local interval records and CRC/input hashes: work/change-tracking-final-{a,b}-{native,xezim}/results.json. Source manifest, aggregate results and validation logs: work/change-tracking-final-*.

Acyclic process bodies run only at their first output projection, but settle planning charged every projection for the complete body and tracked all its reads and writes again. This generated partitions and change watches for work that is never executed, keeping large sets of old values live across the real body.

Plan those reads, writes and costs only at the executing projection. Keep cyclic components and guarded regions unchanged. Remove the full flag-array population count at every settle: when individual flags are all set, their own guards already select every partition; an untracked raw view still forces a full settle.

For larger event sets, evaluate stable clock edges in 64-bit value/mask batches. For SV sensitivity lists without occurrence counters, check four inputs at a time, stop at the first change, and refresh all baselines at initialization or a detected change. Preserve four-state X/Z transitions, ordinary event-control startup, and post-body rearming.

Validation: 621 unit tests and 9,879 behavioral tests passed, with 20 existing skips. The common suite covers native/native-parallel, Cranelift/Cranelift-parallel and Wasm, with focused interpreter and differential scheduler coverage. Added coverage for 70 mixed edges crossing a word boundary and a long sensitivity list with early/late changes, repeated values and X/Z-only changes. The shared sensitivity case passes Icarus; Verilator's adapter reports its four-state expectations unsupported. Affected all-target Clippy, formatting and diff checks passed.

E902/CoreMark four-state steady throughput now exceeds xezim in both long run orders on this machine. These are fresh measurements of this source tree on top of the merged #3003–#3005 stack, using one frozen binary.

| Run order | Celox clocks/CPU-s | xezim clocks/CPU-s | CPU throughput gain | Wall throughput gain |
| --- | ---: | ---: | ---: | ---: |
| Celox first | 33148 | 30482 | 8.75% | 8.74% |
| xezim first | 32605 | 30704 | 6.19% | 6.19% |

Each engine completed 2,359,876 clocks with matching CoreMark CRCs. After warmup, alternate 34 matching 65,536-clock intervals (131,072..2,359,296); whole-window throughput uses process CPU time or wall time excluding controlled pauses. Both engines are pinned to logical CPU 8 on a Ryzen 7 9800X3D. No own builds or tests run during measurements; other machine load is uncontrolled. The Celox-first run had 12 MiB of huge-page-backed executable memory; the xezim-first run had ordinary pages and still won.

RTLmeter revision `4fdd6c3fd154e9b99d3a9d713cf3f4977e284f94`, E902/CoreMark `+iterations=5 +max_cycles=1000000000`. Celox: `heliodor-dev` profile, native O2, four-state, one thread, `--unlimited --no-checkpoint-on-signal --report`. Comparison: xezim 0.11.4, binary SHA256 `afbe25c3906450a35335fb65da2ff6212f0b3e654a0f16c11a2f28a7c29d4e65`. Both use the same progress display once per 65,536 clocks in the existing negedge utility process, with no added RTL process and no two-state fallback.

This qualifies post-JIT throughput for E902/CoreMark on this host. JIT-inclusive total time remains longer for Celox; these are instrumented measurements, not a claim about every RTLmeter design or unmodified release scores.

Measured source tree: `39f916fbacbd5f76a9d476438b080cb755de5f2d`; Celox binary SHA256: `cf3cbb2eda57808751f79fd93f7387eacf1b97d7af9aebbe8c9bcbd189e03e82`. Full local interval records and CRC/input hashes: `work/change-tracking-final-{a,b}-{native,xezim}/results.json`. Source manifest, aggregate results and validation logs: `work/change-tracking-final-*`.

Change-Id: Ia8c215051c2389f4ee7ffdd2af74466ee6d5ead1
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T09:18:26.802641Z ec9ab52 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Nov 2, 2026
@mergify mergify Bot added the queued Mergify queue entry label Nov 2, 2026
@mergify

mergify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 8ba452a at 09:59 UTC

16 min in the queue, 14 min of it CI.

So far

9 merge conditions met
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • check-success = Verify workflow lockfile
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Queue validation
    • check-neutral = @github-actions/Queue validation
    • check-skipped = @github-actions/Queue validation
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Verify workflow lockfile
    • check-neutral = @github-actions/Verify workflow lockfile
    • check-skipped = @github-actions/Verify workflow lockfile

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 8ba452a into master Nov 2, 2026
28 checks passed
@mergify
mergify Bot deleted the stack/tignear/perf/rtlmeter-change-tracking/avoid-redundant-change-tracking--a8c21505 branch November 2, 2026 09:59
@mergify mergify Bot removed the queued Mergify queue entry label Nov 2, 2026
@github-actions github-actions Bot mentioned this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant