data parallelism
Doing the same work on many pieces of data at once, on several CPU cores.
Data parallelism splits a collection across threads; rayon's par_iter does it with a work-stealing pool and an iterator-like API.
Examples
With rayon, changing
readings.iter()toreadings.par_iter()inreadings.par_iter().map(|r| r * 10).sum::<u64>()spreads the work over the CPU cores and gives the same sum.
See also