Lesson 04 · Workflows · 12 min
Parallelisation
When parts of a task do not depend on each other, they can run at the same time. The guide names two shapes, and they are used for different reasons.
The lab's table shows two times for every pattern: wall-clock, and what it would have cost sequentially. For the sequential patterns those are the same. For the parallel ones, wall-clock is lower — on one run, sectioning did four calls in 2.3 seconds that would have taken 3.1 in series.
That is the honest trade. Parallelisation saves time, not tokens: every branch still runs and still costs. Voting in particular triples the generation cost to buy one better answer, and it only pays when the selector is genuinely better at judging than the generator is at generating.
- Parallelise when branches are independent and slow. If they are fast, coordination costs more than it saves.
- Decide in advance what the merge does when one branch fails. Proceeding with partial input and failing entirely are both defensible; not deciding is not.
- Voting needs a selector with a stated criterion. 'Pick the best' produces a coin flip.
Checkpoint
Record the wall-clock and sequential time for sectioning, and say what the difference is.