Skip to content

bench/boundary: stream-shaped lanes (#68) - #81

Merged
lann merged 1 commit into
mainfrom
bench-stream-lanes-68
Aug 11, 2026
Merged

bench/boundary: stream-shaped lanes (#68)#81
lann merged 1 commit into
mainfrom
bench-stream-lanes-68

Conversation

@lann

@lann lann commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #68. Companion to #80 (the #67 bulk-copy PR); this one is bench-only.

Three stream lanes per the issue's table — stream-sink (host→guest), stream-source (guest→host), stream-pass (host↔host after identity transfer, amendment A5) — measured as MB/s over 1200 B / 16 KiB / 256 KiB chunks, medians of 5 timed runs after warmup with per-run byte-count assertions. deltic lanes only; the jco lane skips stream rows with a note (its p3 stream support is not under test).

The README baseline is refreshed from one consistent post-#63/#67 with-jco run — the previous table mixed epochs (pre-#54-fix recv rows beside new stream rows under one date header). recv @ 1200 now tracks the empty call within ~1% and remains the #54 regression sentinel; stream-pass beats sink/source at every size, confirming the identity transfer touches no guest memory. Two methodology footnotes from review: the source lane's in-guest payload alloc, and the one-dimension/two-meanings chunk-size caveat.

Implemented by a coder subagent; reviewed for methodology, embedder-API discipline (one in-flight op per end, transfer-once, borrowed chunks), and territory (nothing outside bench/boundary/**). Gate: just bench-boundary (and with-jco for the baseline).

The rendezvous path had no regression instrument: nothing would catch a
regression in SharedStreamImpl copy mechanics, HostBuffer chunk
preservation, or the CABI bulk paths as exercised via GuestBuffer. Three
lanes, per the issue's table:

  stream-sink    async func(s: stream<u8>) -> u64     host->guest payload
  stream-source  async func(n: u32) -> stream<u8>     guest->host payload
  stream-pass    async func(s: stream<u8>) -> stream<u8>  host<->host after
                                                       identity transfer (A5)

Reported as MB/s (bytes moved / elapsed), medians of 5 timed runs after
a warmup, per-run byte-count assertions; chunk sizes 1200 B / 16 KiB /
256 KiB with per-size counts calibrated to tens-of-ms runs
(sweep.mjs STREAM_CONFIGS, box-calibrated like everything else here).
deltic lanes only — jco's p3 stream support is not under test; the lane
skips the stream rows with a note. Guest exports ride wit-bindgen 0.60
(wit_stream::new + spawn_local for the source; the sink drains via the
StreamReader; pass-through returns its input untouched), mirroring the
examples/guests fixtures.

README: shape table, methodology (including two footnotes from review —
stream-source allocates its payload inside the timed region, so
sink-vs-source deltas are not pure copy-direction cost; "size" means
write granularity for sink but host READ granularity for source/pass),
and a refreshed baseline from one consistent post-#63/#67 run — the
previous table mixed epochs (pre-#54-fix recv rows beside new stream
rows under one date). The recv @ 1200 rows now track the empty call
within ~1% and stay the #54 regression sentinel.

Implemented by a coder subagent against the #68 dispatch; reviewed
(methodology, embedder-API discipline — one in-flight op per end,
transfer-once, borrowed chunks — and territory) with advisories folded
in. Gates: just bench-boundary (with-jco for the baseline run); no
files outside bench/boundary/**.

Closes #68.
@lann
lann enabled auto-merge August 11, 2026 00:58
@lann
lann merged commit 0d199e9 into main Aug 11, 2026
3 checks passed
@lannbot
lannbot deleted the bench-stream-lanes-68 branch August 23, 2026 16:51
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.

bench/boundary: add stream-shaped lanes (rendezvous throughput has no regression instrument)

1 participant