0Pricing
Mojo Academy · Lesson

Splitting Work into Chunks

Divide a range for balanced load.

Why Chunk at All

Launching a thread per element is wasteful. Instead you split the range into a few larger chunks, one per worker.

A Chunk Is a Slice

Each chunk is just a contiguous slice of indices, like 0 to 99 or 100 to 199. One worker owns one slice.

All lessons in this course

  1. The parallelize Function
  2. Splitting Work into Chunks
  3. Combining Parallel and Vector
  4. Avoiding Data Races
← Back to Mojo Academy