filmov
tv
'Java 8 Parallel Streams Workshop', by Stuart Marks

Показать описание
Java 8 Parallel Streams Workshop
One of the promises of the new Lambda and Streams features of Java SE 8 is an easier path to parallel programming. Writing parallel programs is as simple as adding a parallel() call to your stream pipeline. Or is it? Just because something is run in parallel, doesn't mean that it will necessarily run faster. There is inevitable overhead involved in running operations in parallel. The speedup gained from running in parallel might or might not offset this overhead. Another issue is whether certain operations can be performed safely in parallel. Your program might run much faster in parallel, but it doesn't help if you get the wrong answer! Finally, running a computation in parallel not only requires splitting the work so that it can be run by multiple threads, but it also requires merging the results. How to do this is not always obvious, but it's essential to understand merging and reduction in order to write effective parallel programs. The Lambda and Streams support for parallelism in Java SE 8 is not magic that will make all your programs faster. But it does make the mechanics of parallel programming much simpler, so that you can spend more time optimizing parallel algorithms.
Speaker: Stuart Marks, JDK Core Libraries Group, Oracle
One of the promises of the new Lambda and Streams features of Java SE 8 is an easier path to parallel programming. Writing parallel programs is as simple as adding a parallel() call to your stream pipeline. Or is it? Just because something is run in parallel, doesn't mean that it will necessarily run faster. There is inevitable overhead involved in running operations in parallel. The speedup gained from running in parallel might or might not offset this overhead. Another issue is whether certain operations can be performed safely in parallel. Your program might run much faster in parallel, but it doesn't help if you get the wrong answer! Finally, running a computation in parallel not only requires splitting the work so that it can be run by multiple threads, but it also requires merging the results. How to do this is not always obvious, but it's essential to understand merging and reduction in order to write effective parallel programs. The Lambda and Streams support for parallelism in Java SE 8 is not magic that will make all your programs faster. But it does make the mechanics of parallel programming much simpler, so that you can spend more time optimizing parallel algorithms.
Speaker: Stuart Marks, JDK Core Libraries Group, Oracle
Комментарии