Skip to content

perf(sv): keep the packed dimensions of a scope's parameters as they are declared - #4387

Merged
mergify[bot] merged 1 commit into
masterfrom
perf/sv-parameter-dimensions-once
Nov 19, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
perf/sv-parameter-dimensions-once

Conversation

@tignear

@tignear tignear commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Each parameter declaration built the packed dimensions of every parameter
the scope imports and of every one it had declared so far, for the
contexts that bind its value and its type: as many tables as the scope has
parameters, each as large as its packages' parameters. BlackParrot's
modules import the parameters of large configuration packages and declare
many of their own, so the copies of the dimensions of members of packed
structures were a large part of its discovery.

The parameter environment of a scope now builds the dimensions of the
imported parameters once, for the imported symbols they come from, and
each declaration adds those of the scope's parameters to a shared copy.

BlackParrot (1x1 cmark) builds with 7.7% fewer instructions than on
master (2,731.1 G to 2,521.3 G, perf stat instructions:u).

A unit test checks that the environment gives the dimensions of
parameter_packed_dimensions_with_imported for every prefix of a scope's
parameters, with shadowed imported ones, through two tables of imported
symbols. A first version that updated the table as parameters were
declared broke BlackParrot ("constant cast operand") while the suites
passed; BlackParrot's build is this change's regression check, and the
nightly CodSpeed BlackParrot case (#4380) compiles it. Reducing that
shape to a small regression test is #4384.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T04:25:00.940036Z 20c0e5c New commits
ℹ️ 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.

@mergify

mergify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Queue requested — the merge queue status continues in this comment ↓.

@tignear

tignear commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🛑 Queue command cancelled

Queue requested — the merge queue status continues in this comment ↓.

@tignear

tignear commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio dequeue

…are declared

Each parameter declaration built the packed dimensions of every parameter
the scope imports and of every one it had declared so far, for the
contexts that bind its value and its type: as many tables as the scope has
parameters, each as large as its packages' parameters. BlackParrot's
modules import the parameters of large configuration packages and declare
many of their own, so the copies of the dimensions of members of packed
structures were a large part of its discovery.

The parameter environment of a scope now builds the dimensions of the
imported parameters once, for the imported symbols they come from, and
each declaration adds those of the scope's parameters to a shared copy.

BlackParrot (1x1 cmark) builds with 7.7% fewer instructions than on
master (2,731.1 G to 2,521.3 G, perf stat instructions:u).

A unit test checks that the environment gives the dimensions of
`parameter_packed_dimensions_with_imported` for every prefix of a scope's
parameters, with shadowed imported ones, through two tables of imported
symbols. A first version that updated the table as parameters were
declared broke BlackParrot ("constant cast operand") while the suites
passed; BlackParrot's build is this change's regression check, and the
nightly CodSpeed BlackParrot case (#4380) compiles it. Reducing that
shape to a small regression test is #4384.

Change-Id: I3afed5e1f43e5fc3656adb19bc67c23a86b61575
@tignear
tignear force-pushed the perf/sv-parameter-dimensions-once branch from 5b2792d to 20c0e5c Compare November 19, 2026 04:21
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Nov 19, 2026
@mergify mergify Bot added the queued Mergify queue entry label Nov 19, 2026
@mergify

mergify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 3e0c907 at 06:09 UTC

14 min in the queue, 12 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 3e0c907 into master Nov 19, 2026
29 checks passed
@mergify
mergify Bot deleted the perf/sv-parameter-dimensions-once branch November 19, 2026 06:09
@mergify mergify Bot removed the queued Mergify queue entry label Nov 19, 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