python multiprocessing

Опубликовано: 20 Июнь 2021
на канале: Dave's Space
4,068
142

A look into simultaneous multiprocessing in python using the multiprocessing library.

I will show arguably the most useful class Pool() and it's most powerful function starmap().
We will see how multiprocessing is NOT beneficial in all circumstances.
In particular if the function intended to be simultaneously processed is very simple, or the function will not be called many times, multiprocessing can actually be much slower than doing it single core.

And while I did not say this in the video explicitly, using more processes than available cores, will not provide any improvment beyond the actual number of cores!.

Note: at 03:20 I should also add that many CPUs run at a higher clock frequency when fully utilizing a single core, hence using 8 cores will often run 10-15% slower per core!


link to talked about article: https://www.hebergementwebs.com/progr...


Смотрите видео python multiprocessing онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dave's Space 20 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,06 раз и оно понравилось 14 людям.