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
- The parallelize Function
- Splitting Work into Chunks
- Combining Parallel and Vector
- Avoiding Data Races