Тёмный

The Power and Perils of Parallel Streams 

Java
Подписаться 179 тыс.
Просмотров 6 тыс.
50% 1

Venkat Subramaniam, President, Agile Developer, Inc.
“If streams can be parallel, why not make them parallel all the time?” is a common question from developers being introduced to Java 8 streams. This session tackles three separate topics:
1. When to consider parallelization and when not to
2. How to parallelize, how to decide on the number of threads, and how to control the threads pool
3. Some common mistakes people make when using parallel streams
The goal of the session is to explain when and how to make good use of parallel streams.

Наука

Опубликовано:

 

3 окт 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@Dobby_zuul
@Dobby_zuul 2 года назад
Venkat and Josh Long are such great presenters, better than any professor I've had.
@SuperMogan
@SuperMogan 6 лет назад
Best talk ever on parallel streams!!!!
@hl2mukkel
@hl2mukkel 6 лет назад
I love that guy lol
@VinyJones2
@VinyJones2 6 лет назад
Great presentation, thanks you
@ErsinErtan
@ErsinErtan 3 года назад
Summary - 35:26 + Before you turn your code into parallel: 1. Do you have a lot of data to process? 2. Do you have a lot of work to do? Always do project specific benchmarking personally. With findFirst, sequential streams are lazy and stop processing once the result is found, whereas parallel streams compute on partitions of data until the result is found in each individual partition, independent of the other partitions' result, then join their results, which makes parallel processing more computationally intensive.
@geekaffairs6475
@geekaffairs6475 3 года назад
Insightful
@9899013543
@9899013543 5 лет назад
at 30:00 around.. when you changed the forkjoinpool settings at the jvm level to have 100 threads by default at the same time and then ran the program.. how are they able to run parallely when your mahine happened to have the 4 cores as you said, and at max 8 cores as per information given by your java runtime environment (m assuming that it could be due to 4 physical cores + 4 logical cores, as is the case with that proprietary hyper threading model of intel cpu architecture) .. program should still at best have run 7 threads at a time despite creating 100 threads .. rest of the threads should have waited to get their turn .. so it still should have run in 3 busts no? or am i missing something?
@prabhendu
@prabhendu 6 лет назад
31:40 every single time :)
@gyan8485
@gyan8485 5 лет назад
At 33:06 we are performing then compute method parallely , we are introducing shared mutability do we need to have kind of synchronization here ?
@9899013543
@9899013543 5 лет назад
there's really no need for that. if you notice closely.. the number param which you are passing in that compute method is not doing anything and is just for dummy purposes.. its basically like for every iteration, its gonna throw you ths same result.. Integer.range would just specify that for how many times that compute method be called.. in this case they set it up for 1500 so to have computational intensive program for demo purpose and to explain the point. No need of synchronising required as all threads have no mutable shared object.
@maobesoya7335
@maobesoya7335 5 лет назад
Can anyone recommend a good book to understand java memory model ?
Далее
Jump-start Your Microservices Development with Java EE
44:17
Designing Functional Programs
46:16
Просмотров 5 тыс.
Fast and Furious: New Zealand 🚗
00:29
Просмотров 8 млн
РУБИН - ЗЕНИТ: ВСЕ ГОЛЫ
01:03
Просмотров 136 тыс.
Streams in JDK 8: The Good, the Bad, and the Ugly
46:23
CompletableFuture: The Promises of Java
47:47
Просмотров 48 тыс.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
APPLE дают это нам БЕСПЛАТНО!
1:01
Просмотров 772 тыс.
Battery  low 🔋 🪫
0:10
Просмотров 13 млн
АЙФОН Г0ВН0
0:54
Просмотров 1,3 млн
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,2 млн