bi-11 step 02 — The yield cost curve
Goal
Show that "yield more often" has a curve that turns upward, and find where.
Tasks
- Take a 200 ms computation. Chunk it, yielding every 0.5 / 5 / 50 ms via
MessageChannel. - Plot total wall-clock and p75 input delay against yield interval.
- Repeat with
scheduler.yield(). Plot on the same axes. - Construct the continuation-priority case. Arrange for unrelated tasks to arrive while you are
chunking. Show
MessageChannelyielding losing to them andscheduler.yield()not. This is the experiment that proves why the API exists. - Write the recommendation you would give a platform team: which primitive to standardise on, and its failure mode.
Done when
- Two plotted curves, both metrics
- Continuation-priority difference demonstrated, not asserted
- A written recommendation with a stated failure mode