From Concurrent to Parallel
summary
Java SE 8 parallel streams and the fork/join runtime target data-parallel work, not IO concurrency, by using recursive divide-and-conquer on a common ForkJoinPool; benchmarks show near 8× speedup on an 8-core box for a 1,000,000-element int sum but a ~5× slowdown for boxed Integer due to poor locality. A practical rule is N×Q > 10,000 (N items × work per item) before parallelism pays, and parallelism is limited by splitting cost, merge cost, encounter-order ops, and shared mutable state.
AI-written summary · about
chapters (16)
- 0:00Introduction to the talk
- 0:40The end of Moore's Law
- 2:36Challenges in using multi-cores
- 4:23History of Java concurrency
- 7:31Concurrency vs. parallelism
- 11:07Requirements for parallelism
- 13:23Exploitable parallelism
- 17:17Parallel decomposition patterns
- 23:12Divide and conquer technique
- 29:06Sources of parallel overhead
- 32:52The Fork/Join framework
- 34:18Introduction to Java streams
- 37:20Stream performance modeling
- 44:33Optimizing stream performance
- 48:57Conclusion and best practices
- 50:27Q&A session
related talks
50mFrom Concurrent to Parallel
46mMake Your CPU Cores Sweat with Parallel Streams
45mThe Power and Perils of Parallel Streams
48mParallel Streams, CompletableFuture, and All That: Concurrency in Java 8
02h 35mParallel and Asynchronous Programming with Streams and CompletableFuture
41mParallel Programming, Fork Join, and Reducers
01h 00mLet’s Get to the Rapids: Java 8 Stream Performance
58mTurbo Charge CPU Utilization in Fork/Join Using the ManagedBlocker
