bi-11 step 02 — The yield cost curve

Goal

Show that "yield more often" has a curve that turns upward, and find where.

Tasks

  1. Take a 200 ms computation. Chunk it, yielding every 0.5 / 5 / 50 ms via MessageChannel.
  2. Plot total wall-clock and p75 input delay against yield interval.
  3. Repeat with scheduler.yield(). Plot on the same axes.
  4. Construct the continuation-priority case. Arrange for unrelated tasks to arrive while you are chunking. Show MessageChannel yielding losing to them and scheduler.yield() not. This is the experiment that proves why the API exists.
  5. 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