Skip to content

perf: lazy stream seeding, prepared interventions, cheaper resampling and lgamma - #48

Merged
whilo merged 4 commits into
mainfrom
perf/round2
Oct 5, 2026
Merged

whilo merged 4 commits into
mainfrom
perf/round2

Conversation

@whilo

@whilo whilo commented Oct 5, 2026

Copy link
Copy Markdown
Member

Round 2 of the stack-wide performance work (agent-assisted, reviewed). Fixed-seed outputs bit-identical on all benchmark workloads.

  • 2dd8603: keyed random streams are seeded on their first draw, not when created.
  • 2476021: conditional resampling reuses its cumulative weights.
  • 5b636af: a policy prepares its interventions once instead of per site.
  • 373b925: lgamma without sequence allocation.

Clean A/B (3 alternating runs, together with spindel #109): SMC 4.55→3.93 s, MH 5.58→4.57 s, particle Gibbs 51.0→43.6 s. Full foerster suite: 200 tests / 3253 assertions pass (incl. random and benchmark namespaces). Tests added for nested and unseeded streams.

@whilo
whilo merged commit ec90811 into main Oct 5, 2026
7 checks passed
@whilo
whilo deleted the perf/round2 branch October 5, 2026 16:27
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