Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Make Your CPU Cores Sweat with Parallel Streams in Java 8

Java via YouTube

Overview

Explore parallel streams in Java 8 to maximize CPU core utilization in this 46-minute conference talk by Lukasz Pater, a developer and programmer at CERN. Learn how the Streams API simplifies parallelism compared to traditional threading approaches. Discover the inner workings of the parallelStream method, understand key rules and best practices for effective implementation, and gain insights into avoiding common traps and performance issues. Delve into topics such as Spliterators, the Fork/Join Framework, and the decomposition of different stream sources. Compare parallel streams with earlier multithreading techniques and examine important considerations like decomposability and auto(un)boxing. Master methods like findAny(), unordered(), sequential(), and parallel() to optimize your parallel stream operations.

Syllabus

Intro
What is CERN?
Manipulating collections before Java 8
Manipulating data with streams
Threads (JDK 1) Invocation of a thread results in a new path of execution Thread API is still great for simple asynchronous tasks and background processing
Executor Service (JDK 5) Java 5 introduced several new APIs that simplify design and development of multi-thread applications
Parallel Streams (JDK 8) The Stream library enables you to execute operations in parallel without much effort Under the hood it employs the forkjoin framework and the Spliterator
Fork/Join Framework (JDK7) Fork
F/J Framework and Parallel Streams
Custom F/J Pool for a Parallel Stream(s)?
Decomposing LinkedList and ArrayList Always take into account how well the stream source decomposes
Decomposing various stream sources
Decomposability and Auto(un)boxing
findAny () and unordered ()
sequential() and parallel()
Conclusions

Taught by

Java

Reviews

Start your review of Make Your CPU Cores Sweat with Parallel Streams in Java 8

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.