The hand-off

The hand-off must cost less than about 0.1 us a draw, or it takes most of the gain. Like Eden's command chunks, Stage 1 writes its results into a ring by value (no pointer into state that changes later), in batches, with one atomic store of the write position for each batch and no allocation for each draw. Stage 2 reads a batch, and waits only when the ring is empty.


Made from docs/dev/parallel-draw-prep.md at 69237645142c. GPL-3.0-or-later.