Skip to content

Stop counting instructions for the project builds - #9274

Merged
cknitt merged 2 commits into
masterfrom
build-benchmarks-no-instructions
Nov 9, 2026
Merged

cknitt merged 2 commits into
masterfrom
build-benchmarks-no-instructions

Conversation

@cknitt

@cknitt cknitt commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

The benchmarks job failed on #9267 (run) with build/leaf-edit +348% and build/no-op +54% instructions, although their allocated words didn't change by 0.1%.

The cause: rescript build runs with an interrupt poll, which starts a ticker thread (Process_child.with_completion_notifier) that wakes the scheduler every 5 ms of wall-clock time while work runs. Under cachegrind the build is 20–50× slower, so the number of wake-ups, and the instructions they execute, depend on how fast the runner is. #9272 had seen 9.5% on the shared-edit build already and kept the two small builds, which then happened to match.

This stops counting instructions for the project builds; their allocated words, which agree within 0.0004% between runs, stay. The replayed single-file builds, stress inputs and parse/format benchmarks keep their instruction counts. The job also gets faster by the two cachegrind builds per side.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm

A ticker wakes the build's scheduler every 5 ms of wall-clock time, so
under cachegrind the builds' instructions depend on how fast the runner is:
in #9267 the leaf-edit build grew by 348% and the no-op build by 54%
although their allocations didn't change, failing the job. Their allocated
words stay, and the job runs faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt cknitt added the changelog:skip No release notes needed label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Changelog

No changelog entry.

Semantic Diff

2 commits · Full page

Stop counting instructions for the project builds

8eb8855 · cknitt + Claude · Nov 09, 2026, 09:29 UTC

A ticker wakes the build's scheduler every 5 ms of wall-clock time, so under cachegrind the builds' instructions depend on how fast the runner is: in #9267 the leaf-edit build grew by 348% and the no-op build by 54% although their allocations didn't change, failing the job. Their allocated words stay, and the job runs faster.

✨ Retrigger the DCO check

067d97f · cknitt + Claude · Nov 09, 2026, 11:11 UTC · new

The DCO app left its check suite for the previous commit queued and never reported; a new commit makes it check the pull request again.

@cknitt
cknitt requested a review from fhammerschmidt November 9, 2026 09:36
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 806,109,965 → 806,109,889 (±0.00%).

None of the 261 benchmarks changed by 0.1% or more.

Instructions

In total: 10,226,962,100 → 10,226,962,100 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 29,806,856 → 29,806,856 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request 067d97f compared with base bcb7ec7 in this run.

@cknitt
cknitt marked this pull request as ready for review November 9, 2026 09:55
@cknitt
cknitt enabled auto-merge (squash) November 9, 2026 09:58
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

@cknitt cknitt closed this Nov 9, 2026
auto-merge was automatically disabled November 9, 2026 11:06

Pull request was closed

@cknitt cknitt reopened this Nov 9, 2026
The DCO app left its check suite for the previous commit queued and never
reported; a new commit makes it check the pull request again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm
Signed-off-by: Christoph Knittel <ck@cca.io>
@pkg-pr-new

pkg-pr-new Bot commented Nov 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9274

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9274

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9274

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9274

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9274

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9274

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9274

commit: 067d97f

@cknitt
cknitt merged commit a72e96a into master Nov 9, 2026
27 checks passed
@cknitt
cknitt deleted the build-benchmarks-no-instructions branch November 9, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip No release notes needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants