Processes a range of items in worker tasks and returns them as an unordered range.
The order of the result stream can deviate from the order of the input items, but the approach is more efficient that an ordered map.#
import std.algorithm : isPermutation, map; import std.array : array; import std.range : iota; auto res = iota(100) .parallelMap!(i => 2 * i) .array; assert(res.isPermutation(iota(100).map!(i => 2 * i).array));
parallelMap
See Implementation
Processes a range of items in worker tasks and returns them as an unordered range.
The order of the result stream can deviate from the order of the input items, but the approach is more efficient that an ordered map.#