Skip to content

profile harness: parallelise roles, hoist message generation, add PROFILE_ROLE - #18

Merged
noot merged 1 commit into
mainfrom
noot/fix-profile-harness
Nov 5, 2026
Merged

noot merged 1 commit into
mainfrom
noot/fix-profile-harness

Conversation

@noot

@noot noot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes examples/profile.rs so clients, server unseals and server rounds run in parallel instead of serially, messages are drawn once outside the timed loop, and PROFILE_ROLE=client|server|recipient repeats only one party's work.

On 32 threads a round drops from 1.39 s to 0.30 s and idle rayon time from 30% to 2%. No library changes.

#15 is stacked on this.

…FILE_ROLE

the driver looped over clients, envelopes and servers serially with only
the small per-call fan-out inside, so most rayon workers idle-spun and the
profile was dominated by that and by the driver's own message rng. client
rounds now run concurrently across clients on forked seeds, each server
unseals and sums its inbox in parallel with the others, messages are drawn
once in setup, and PROFILE_ROLE repeats one party's work in isolation.
@noot
noot marked this pull request as ready for review November 5, 2026 21:47
@noot
noot merged commit d4b0af3 into main Nov 5, 2026
3 checks passed
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