Skip to content

Version Packages - #93

Merged
SandroMaglione merged 1 commit into
mainfrom
changeset-release/main
Aug 11, 2026
Merged

Version Packages#93
SandroMaglione merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@typeonce/effect-machine@0.5.1

Patch Changes

  • a23463c: Complete the interactive examples, align example state construction with the recommended API, and restructure the README around the current usage patterns.

@github-actions

Copy link
Copy Markdown
Contributor Author

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.defineStates (3 states) 2,965 2,965 0 (0.0%)
Machine.make (3 states, 2 events) 8,715 8,715 0 (0.0%)
machine.handle (3 states, 2 transitions) 23,492 23,492 0 (0.0%)
machine.handle (depth 8) 117,075 117,075 0 (0.0%)
machine.handle (depth 12) 129,713 129,713 0 (0.0%)
machine.handle (depth 16) 145,055 145,055 0 (0.0%)
machine.handle (depth 24) 183,851 183,851 0 (0.0%)
machine.handle (wide depth 16) 214,189 214,189 0 (0.0%)
machine.handle (parallel/history/choice) 132,667 132,667 0 (0.0%)
machine.handle (4 successive calls) 128,674 128,674 0 (0.0%)
machine exact input/output/error/services 110,584 110,584 0 (0.0%)
execution adapter readiness 127,854 127,854 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.defineStates (3 states) 2,910 2,910 0 (0.0%)
Machine.make (3 states, 2 events) 5,742 5,742 0 (0.0%)
machine.handle (3 states, 2 transitions) 14,777 14,777 0 (0.0%)
machine.handle (depth 8) 109,601 109,601 0 (0.0%)
machine.handle (depth 12) 121,039 121,039 0 (0.0%)
machine.handle (depth 16) 135,181 135,181 0 (0.0%)
machine.handle (depth 24) 171,577 171,577 0 (0.0%)
machine.handle (wide depth 16) 202,224 202,224 0 (0.0%)
machine.handle (parallel/history/choice) 114,331 114,331 0 (0.0%)
machine.handle (4 successive calls) 113,703 113,703 0 (0.0%)
machine exact input/output/error/services 100,670 100,670 0 (0.0%)
execution adapter readiness 102,092 102,092 0 (0.0%)
Check times (informational)
Scenario Base PR
Effect only 0.02s 0.02s
Import effect-machine 0.02s 0.02s
Machine.defineStates (3 states) 0.08s 0.07s
Machine.make (3 states, 2 events) 0.12s 0.12s
machine.handle (3 states, 2 transitions) 0.17s 0.16s
machine.handle (depth 8) 0.39s 0.37s
machine.handle (depth 12) 0.41s 0.40s
machine.handle (depth 16) 0.45s 0.45s
machine.handle (depth 24) 0.51s 0.52s
machine.handle (wide depth 16) 0.56s 0.56s
machine.handle (parallel/history/choice) 0.46s 0.44s
machine.handle (4 successive calls) 0.43s 0.44s
machine exact input/output/error/services 0.38s 0.40s
execution adapter readiness 0.44s 0.43s

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

@github-actions

Copy link
Copy Markdown
Contributor Author

Runtime performance

Median of 5 independent benchmark processes on INTEL(R) XEON(R) PLATINUM 8573C with Node v24.18.0.

Pull request baseline

Scenario Effect Machine XState 5 XState 6 alpha
Plan counter transitions 144,880 transitions/s 143,827 transitions/s 17,563 transitions/s
Drain burst with terminal fence 589,029 increments/s 411,993 increments/s 186,372 increments/s
Drain burst with a change observer 544,972 increments/s 411,837 increments/s 184,107 increments/s
Lookup and send to one child 481,183 increments/s 409,331 increments/s 177,687 increments/s
Start and stop a machine 201,532 machines/s 203,004 machines/s 157,011 machines/s
Start and stop a parent with one child 54,469 families/s 77,435 families/s 50,702 families/s
Plan transitions through a compound state 133,751 transitions/s
Plan transitions through parallel regions 102,632 transitions/s
Drain burst through a compound state 542,458 events/s 365,572 events/s 179,331 events/s
Drain burst through two parallel regions 516,291 events/s 284,779 events/s 144,673 events/s
Drain a compound-state burst with a change observer 512,542 events/s

Effect runtime reference points

Scenario Effect Machine Effect runtime primitives
Start and stop a raw generic process 31,894 processes/s
Start and stop a raw compiled process 82,871 processes/s
Start and interrupt a suspended fiber 188,573 fibers/s
Start and stop a queue worker 137,684 workers/s
Start and stop an actor shell 127,243 actors/s
Start and stop two actor shells 74,405 families/s
Update an owner-only mutable snapshot 302,023,558 updates/s
Update a synchronized snapshot 1,740,605 updates/s
Create, resolve, and await a terminal latch 1,640,681 latches/s
Memory profile Effect Machine XState 5 XState 6 alpha Effect runtime primitives
Idle machine 1.5 KiB 3.8 KiB 2.2 KiB
Raw generic managed process 12.7 KiB
Raw compiled process 2.8 KiB
Two independent idle machines 2.9 KiB 7.3 KiB 3.9 KiB
Idle parent with one child 4.8 KiB 5.5 KiB 4.0 KiB
Parent with observed child registry 9.0 KiB
Parent with observed invoked child snapshots 5.0 KiB
Suspended Effect fiber 0.6 KiB
Effect queue with waiting fiber 2.8 KiB
Effect mailbox actor shell 3.2 KiB
Two Effect actor shells 6.8 KiB

Effect Machine change from base

Metric Base Base variability PR PR variability Difference
Plan counter transitions 142,502 transitions/s 2.4% MAD 144,880 transitions/s 2.0% MAD +1.7%
Drain burst with terminal fence 576,548 increments/s 1.4% MAD 589,029 increments/s 2.9% MAD +2.2%
Drain burst with a change observer 538,063 increments/s 2.1% MAD 544,972 increments/s 3.4% MAD +1.3%
Lookup and send to one child 472,871 increments/s 1.3% MAD 481,183 increments/s 1.3% MAD +1.8%
Start and stop a machine 201,491 machines/s 0.4% MAD 201,532 machines/s 2.4% MAD +0.0%
Start and stop a parent with one child 52,510 families/s 1.5% MAD 54,469 families/s 3.6% MAD +3.7%
Plan transitions through a compound state 131,353 transitions/s 3.6% MAD 133,751 transitions/s 1.2% MAD +1.8%
Plan transitions through parallel regions 103,237 transitions/s 1.0% MAD 102,632 transitions/s 0.3% MAD -0.6%
Drain burst through a compound state 539,030 events/s 2.1% MAD 542,458 events/s 1.5% MAD +0.6%
Drain burst through two parallel regions 502,465 events/s 0.5% MAD 516,291 events/s 0.9% MAD +2.8%
Drain a compound-state burst with a change observer 505,468 events/s 2.7% MAD 512,542 events/s 0.9% MAD +1.4%
Idle machine heap per unit 1.5 KiB 0.0% MAD 1.5 KiB 0.1% MAD -0.1%
Raw generic managed process heap per unit 12.6 KiB 0.0% MAD 12.7 KiB 0.0% MAD +0.0%
Raw compiled process heap per unit 2.8 KiB 0.4% MAD 2.8 KiB 0.5% MAD -0.5%
Two independent idle machines heap per unit 3.0 KiB 0.2% MAD 2.9 KiB 0.0% MAD -0.2%
Idle parent with one child heap per unit 4.8 KiB 0.1% MAD 4.8 KiB 0.0% MAD +0.1%
Parent with observed child registry heap per unit 9.0 KiB 0.1% MAD 9.0 KiB 0.0% MAD +0.0%
Parent with observed invoked child snapshots heap per unit 5.0 KiB 0.0% MAD 5.0 KiB 0.0% MAD +0.0%

Effect runtime reference change from base

Metric Base Base variability PR PR variability Difference
Start and stop a raw generic process 31,924 processes/s 1.0% MAD 31,894 processes/s 2.0% MAD -0.1%
Start and stop a raw compiled process 82,974 processes/s 1.4% MAD 82,871 processes/s 1.0% MAD -0.1%
Start and interrupt a suspended fiber 186,637 fibers/s 0.5% MAD 188,573 fibers/s 0.4% MAD +1.0%
Start and stop a queue worker 136,780 workers/s 1.3% MAD 137,684 workers/s 0.7% MAD +0.7%
Start and stop an actor shell 126,566 actors/s 0.3% MAD 127,243 actors/s 1.0% MAD +0.5%
Start and stop two actor shells 77,833 families/s 3.1% MAD 74,405 families/s 1.0% MAD -4.4%
Update an owner-only mutable snapshot 301,023,480 updates/s 0.4% MAD 302,023,558 updates/s 2.7% MAD +0.3%
Update a synchronized snapshot 1,709,714 updates/s 0.6% MAD 1,740,605 updates/s 1.5% MAD +1.8%
Create, resolve, and await a terminal latch 1,661,124 latches/s 0.7% MAD 1,640,681 latches/s 1.5% MAD -1.2%
Versions and interpretation
  • Effect Machine: 0.5.1
  • XState 5: 5.32.5
  • XState 6 alpha: 6.0.0-alpha.31
  • Effect runtime primitives: 4.0.0-beta.107

Higher throughput is better; lower heap is better. Variability is the median absolute deviation across independent processes, relative to their median. Runtime measurements on shared GitHub-hosted hardware remain informational, so small differences should be confirmed across multiple workflow runs.

@SandroMaglione
SandroMaglione merged commit 31e3b43 into main Aug 11, 2026
9 checks passed
@SandroMaglione
SandroMaglione deleted the changeset-release/main branch August 11, 2026 15:02
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