RUVIDEO
Поделитесь видео 🙏

Threads vs Coroutines - ParallelMap Performance смотреть онлайн

In the last episode we implemented a parallelMap operation using streams, raw threads, a threadpool with futures, and coroutines. At first glance the raw threads was quickest, followed by futures, coroutines and then streams.

In this, part 56 of an exploration of where a Test Driven Development implementation of the Gilded Rose stock control system might take us in Kotlin, we investigate the performance of the different functions further, in particular digging down into why coroutines seem to be slow and finding a way to speed them up. We also find a way to use a particular ForkJoinPool to run the streams code, making it as fast as the others (bar the raw threads).

Frankly we only use very rough benchmarks here, with no statistical testing except 'it looks like'. That's OK for gross differences, but is highly suspect when deciding which of two similarly performant approaches is faster. For that check out JMH https://github.com/openjdk/jmh
and you could watch my video from KotlinConf 2017 - https://www.youtube.com/watch?v=ExkNNsDn6Vg . [The next episode also has a bit of a better treatment of the benchmarks - https://youtu.be/ydaeEGUrjew]

You can see the whole of this series as a playlist
https://www.youtube.com/playlist?list=PL1ssMPpyqociJNwykAOB9_KEZVW7BW7m2
and the code on GitHub
https://github.com/dmcg/gilded-rose-tdd

If you like this, you’ll probably like the book Java to Kotlin, A Refactoring Guidebook
http://java-to-kotlin.dev
Also if you're going to KotlinConf in April 2023, you could work with Nat Pryce and me at our TDD workshop at KotlinConf https://kotlinconf.com/workshops/

The music in this episode is used with permission from http://toolofgod.com/my-music/royalty-free-benny-hill-theme-style-alternative/ -

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Threads vs Coroutines - ParallelMap Performance» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.