https://dbader.org/python-tricks ► Write better & cleaner code using Python's advanced features
In this tutorial you'll learn how to do parallel programming in Python using functional programming principles and the "multiprocessing" module.
We'll take the example data set based on an immutable data structure that we previously transformed using the built-in "map" function. But this time we'll process the data it in parallel, across multiple CPU cores using the Python "multiprocessing" module available in the standard library.
You'll see step by step how to parallelize an existing piece of Python code so that it can execute much faster and leverage all of your available CPU cores.
You'll learn how to use the "multiprocessing.Pool" class and it's parallel "map" implementation that makes parallelizing most Python code that's written in a functional style a breeze.
As part of this video we'll build a little testbed program first that we can use to measure the execution time with the "time.time()" function, so that we can compare the single-threaded and multithreaded implementations of the same algorithm.
Stay tuned for the next video in the series where you'll learn how to make your Python programs multithreaded using the "concurrent.futures" module as an alternative way to implement concurrency.
FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery
SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube
* *
► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com
► PythonistaCafe – A peer-to-peer learning community for Python developers: https://www.pythonistacafe.com
FREE Python Coding Tutorials & News:
» Python Tutorials: https://dbader.org
» Python News on Twitter: / @dbader_org
» Weekly Tips for Pythonistas: https://dbader.org/newsletter
» Subscribe to this channel: https://dbader.org/youtube
Nesta página do site você pode assistir ao vídeo on-line Functional Programming in Python: Parallel Processing with "multiprocessing" duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Real Python 04 Outubro 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 59,856 vezes e gostou 1.1 mil espectadores. Boa visualização!