method race
1 | role Iterable |
1.1 | (Iterable) method race |
2 | class HyperSeq |
2.1 | (HyperSeq) method race |
3 | class RaceSeq |
3.1 | (RaceSeq) method race |
Documentation for method race
assembled from the following types:
role Iterable
From Iterable
(Iterable) method race
Defined as:
method race(Int(Cool) : = 64, Int(Cool) : = 4 --> Iterable)
Returns another Iterable that is potentially iterated in parallel, with a given batch size and degree of parallelism (number of parallel workers).
Unlike hyper
, race
does not preserve the order of elements.
say ([1..100].race.map().list);
Use race in situations where it is OK to do the processing of items in parallel, and the output order does not matter. See hyper
for situations where you want items processed in parallel and the output order should be kept relative to the input order.
Blog post on the semantics of hyper and race
See hyper
for an explanation of :$batch
and :$degree
.
class HyperSeq
From HyperSeq
(HyperSeq) method race
method race(HyperSeq:)
Creates a RaceSeq
object out of the current one.
class RaceSeq
From RaceSeq
(RaceSeq) method race
method race(RaceSeq:)
Returns the object.