Skip to content

Accept Effect ^4.0.0 again - #232

Merged
SandroMaglione merged 1 commit into
mainfrom
restore-effect-4-0-0-range
Oct 21, 2026
Merged

SandroMaglione merged 1 commit into
mainfrom
restore-effect-4-0-0-range

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

Summary

Changeset

  • Added or updated for a library or package-metadata change
  • Not required because this PR does not change a publishable package

Patch: widening the supported range is compatible.

Validation

  • pnpm check
  • Automated type-performance measurement passed or was not required
  • Automated runtime- and memory-performance measurement passed or was not required

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Type performance

Measured with TypeScript 6.0.3 and skipLibCheck=true.

Scenario Base PR Difference
Effect only 55 55 0 (0.0%)
Import effect-machine 55 55 0 (0.0%)
Machine.state (3 children) 2,664 2,664 0 (0.0%)
Machine.make (3 states, 2 events) 8,932 8,932 0 (0.0%)
machine.handle (3 states, 2 transitions) 39,348 39,348 0 (0.0%)
declared transition (10 named branches) 60,165 60,165 0 (0.0%)
atomic construction, guards, and reentry 85,402 85,402 0 (0.0%)
registered invocation (input-taking Effect) 39,467 39,467 0 (0.0%)
machine.handle (depth 24) 194,526 194,526 0 (0.0%)
machine.handle (wide depth 16) 218,233 218,233 0 (0.0%)
machine.handle (parallel/history/choice) 91,633 91,633 0 (0.0%)
machine definition (3 independent implementations) 98,225 98,225 0 (0.0%)
machine exact input/output/error/services 82,791 82,791 0 (0.0%)
execution adapter readiness 71,416 71,416 0 (0.0%)

Marginal instantiations are measured against the matching setup without that API call:

Scenario Base PR Difference
Import effect-machine 0 0 0
Machine.state (3 children) 2,609 2,609 0 (0.0%)
Machine.make (3 states, 2 events) 6,260 6,260 0 (0.0%)
machine.handle (3 states, 2 transitions) 30,416 30,416 0 (0.0%)
declared transition (10 named branches) 51,612 51,612 0 (0.0%)
atomic construction, guards, and reentry 70,062 70,062 0 (0.0%)
registered invocation (input-taking Effect) 32,330 32,330 0 (0.0%)
machine.handle (depth 24) 177,217 177,217 0 (0.0%)
machine.handle (wide depth 16) 201,702 201,702 0 (0.0%)
machine.handle (parallel/history/choice) 79,135 79,135 0 (0.0%)
machine definition (3 independent implementations) 87,544 87,544 0 (0.0%)
machine exact input/output/error/services 70,582 70,582 0 (0.0%)
execution adapter readiness 31,918 31,918 0 (0.0%)
Check times (informational)
Scenario Base PR
Effect only 0.04s 0.03s
Import effect-machine 0.04s 0.03s
Machine.state (3 children) 0.10s 0.09s
Machine.make (3 states, 2 events) 0.15s 0.14s
machine.handle (3 states, 2 transitions) 0.32s 0.31s
declared transition (10 named branches) 0.39s 0.39s
atomic construction, guards, and reentry 0.52s 0.50s
registered invocation (input-taking Effect) 0.31s 0.32s
machine.handle (depth 24) 0.65s 0.65s
machine.handle (wide depth 16) 0.70s 0.73s
machine.handle (parallel/history/choice) 0.51s 0.54s
machine definition (3 independent implementations) 0.54s 0.56s
machine exact input/output/error/services 0.52s 0.51s
execution adapter readiness 0.44s 0.45s

Type instantiations are the comparison metric. Check time varies with runner load and is informational only.

@github-actions

Copy link
Copy Markdown
Contributor

Runtime performance

Median of 5 independent benchmark processes on AMD EPYC 7763 64-Core Processor with Node v24.21.0.

Pull request baseline

Scenario Effect Machine
Plan counter transitions 115,576 transitions/s
Drain burst with terminal fence 406,594 increments/s
Drain burst with a change observer 377,642 increments/s
Lookup and send to one child 331,944 increments/s
Start and stop a machine 131,510 machines/s
Start and stop a parent with one child 26,115 families/s
Complete an Effect invocation with tracing enabled 7,266 invocations/s
Complete an Effect invocation with tracing disabled 8,935 invocations/s
Plan transitions through a compound state 102,866 transitions/s
Plan transitions through parallel regions 82,109 transitions/s
Drain burst through a compound state 347,952 events/s
Drain burst through two parallel regions 320,787 events/s
Drain a compound-state burst with a change observer 324,239 events/s

Process runtime reference points

Scenario Effect Machine
Start and stop a raw generic process 21,387 processes/s
Start and stop a raw compiled process 73,605 processes/s
Memory profile Effect Machine
Idle machine 1.8 KiB
Raw generic managed process 11.5 KiB
Raw compiled process 3.0 KiB
Two independent idle machines 3.4 KiB
Idle parent with one child 5.9 KiB
Parent with observed child registry 9.4 KiB
Parent with observed invoked child snapshots 6.4 KiB

Effect Machine change from base

Metric Base Base variability PR PR variability Difference
Plan counter transitions 117,610 transitions/s 1.1% MAD 115,576 transitions/s 1.5% MAD -1.7%
Drain burst with terminal fence 404,491 increments/s 1.2% MAD 406,594 increments/s 0.4% MAD +0.5%
Drain burst with a change observer 380,342 increments/s 1.0% MAD 377,642 increments/s 0.1% MAD -0.7%
Lookup and send to one child 332,719 increments/s 0.7% MAD 331,944 increments/s 0.6% MAD -0.2%
Start and stop a machine 132,714 machines/s 0.6% MAD 131,510 machines/s 0.1% MAD -0.9%
Start and stop a parent with one child 25,397 families/s 2.2% MAD 26,115 families/s 2.8% MAD +2.8%
Complete an Effect invocation with tracing enabled 7,232 invocations/s 0.4% MAD 7,266 invocations/s 1.1% MAD +0.5%
Complete an Effect invocation with tracing disabled 8,894 invocations/s 0.4% MAD 8,935 invocations/s 2.2% MAD +0.5%
Plan transitions through a compound state 103,131 transitions/s 0.8% MAD 102,866 transitions/s 1.5% MAD -0.3%
Plan transitions through parallel regions 80,376 transitions/s 0.9% MAD 82,109 transitions/s 1.9% MAD +2.2%
Drain burst through a compound state 345,740 events/s 1.7% MAD 347,952 events/s 1.3% MAD +0.6%
Drain burst through two parallel regions 321,138 events/s 1.0% MAD 320,787 events/s 1.4% MAD -0.1%
Drain a compound-state burst with a change observer 324,327 events/s 1.5% MAD 324,239 events/s 0.3% MAD -0.0%
Idle machine heap per unit 1.8 KiB 0.4% MAD 1.8 KiB 0.5% MAD +0.5%
Raw generic managed process heap per unit 11.6 KiB 0.0% MAD 11.5 KiB 0.0% MAD -0.7%
Raw compiled process heap per unit 3.0 KiB 0.4% MAD 3.0 KiB 0.4% MAD -0.2%
Two independent idle machines heap per unit 3.4 KiB 0.9% MAD 3.4 KiB 0.2% MAD -0.2%
Idle parent with one child heap per unit 5.9 KiB 0.0% MAD 5.9 KiB 0.0% MAD -0.0%
Parent with observed child registry heap per unit 9.5 KiB 0.0% MAD 9.4 KiB 0.0% MAD -1.1%
Parent with observed invoked child snapshots heap per unit 6.4 KiB 0.2% MAD 6.4 KiB 0.0% MAD -0.1%

Process runtime reference change from base

Metric Base Base variability PR PR variability Difference
Start and stop a raw generic process 19,442 processes/s 3.6% MAD 21,387 processes/s 1.2% MAD +10.0%
Start and stop a raw compiled process 72,223 processes/s 1.0% MAD 73,605 processes/s 0.2% MAD +1.9%

Regression guard

No large, noise-adjusted throughput or heap regressions detected.

Versions and interpretation
  • Effect Machine: 0.41.0

Higher throughput is better; lower heap is better. Variability is the median absolute deviation across independent processes, relative to their median. Small differences on shared GitHub-hosted hardware remain informational; the required guard rejects only large changes beyond the measured noise allowance.

@SandroMaglione
SandroMaglione merged commit 456c8b8 into main Oct 21, 2026
9 checks passed
@SandroMaglione
SandroMaglione deleted the restore-effect-4-0-0-range branch October 21, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant