filmov
tv
Java Parallel Streams Internals: Demo'ing Collector Performance (Part 1)
Показать описание
This video presents part 1 of a three part case study exploring the performance differences between non-concurrent and concurrent collectors in Java Parallel Streams. This "ex36" case study emphasizes that these collectors behave differently depending on whether they are used in parallel or sequential streams, and that the advantages of concurrency become increasingly significant as the size of the data set grows. Non-concurrent collectors operate by having separate threads accumulate data into mutable result containers, which are later merged. In contrast, concurrent collectors use a single thread-safe mutable result container, thus eliminating the need for merging intermediate results. The ex36 case study features a GitHub example that illustrates these concepts using standard Java sets and a custom "concurrent set collector," which are covered in the next two parts of this video sequence.