Java Reference
In-Depth Information
Figure 6.8. Parallelizing the reduction process using the combiner
method
The original stream is recursively split in substreams until a condition defining whether a stream
needs to be further divided becomes false (parallel computing is often slower than sequential
computing when the units of work being distributed are too small, and it's pointless to generate many
more parallel tasks than you have processing cores).
At this point all substreams can be processed in parallel, each of them using the sequential reduction
algorithm shown in figure 6.7 .
 
Search WWH ::




Custom Search