filmov
tv
How to Speed Up Python Code with Threading [Tutorial]

Показать описание
Multithreading and multiprocessing allow computers to multitask and perform various tasks at the same time.
These concepts also help provide insane speedups to Python code.
In this video I will present the threading module in Python.
But first, I briefly explain threads, processes and the differences between parallelism and concurrency. Due to the global interpreter lock Python multithreading only achieves concurrency and not parallelism.
We look at some examples of how to speed up a Python program by using multiple threads. Finally, I also demonstrate through a code example how multithreading only leads to speed up in IO bound applications (and not CPU bound ones).
Source code:
00:00 intro
00:29 what are threads and processes?
01:12 client and server example
01:36 Global interpreter lock
01:55 parallelism vs. concurrency
03:53 Code: simple multithreading
05:30 Code: speed up with multithreading
07:16 Code: multithreading fails at CPU bound tasks
08:19 End
Please consider liking if you found the video useful and subscribe for more!
These concepts also help provide insane speedups to Python code.
In this video I will present the threading module in Python.
But first, I briefly explain threads, processes and the differences between parallelism and concurrency. Due to the global interpreter lock Python multithreading only achieves concurrency and not parallelism.
We look at some examples of how to speed up a Python program by using multiple threads. Finally, I also demonstrate through a code example how multithreading only leads to speed up in IO bound applications (and not CPU bound ones).
Source code:
00:00 intro
00:29 what are threads and processes?
01:12 client and server example
01:36 Global interpreter lock
01:55 parallelism vs. concurrency
03:53 Code: simple multithreading
05:30 Code: speed up with multithreading
07:16 Code: multithreading fails at CPU bound tasks
08:19 End
Please consider liking if you found the video useful and subscribe for more!
How To SPEED Up Python Code
Turn Python BLAZING FAST with these 6 secrets
Python Performance Secrets Most Developers Don't Know About
Compiled Python is FAST
Use THIS Language to Speed Up Your Python Code
Make Python 1000x Faster With One Line 🐍 ⏩ (Numba Tutorial)
Massively Speed-Up Python Code With Numba Compilation
How to speed up Python 5 [ACTIONABLE] Ways to Increase Pythons Speed (2021)
python funk speed up #funk
THIS Will Speed Up Your Python Programming Workflow #coding #programming #python
Using Cython to speed up Python
The Fastest Way To Type time | #asmr #computer #fasttypingkeyboard #typing
How to speed up your Python for Data Science
The Fastest Way to Loop in Python - An Unfortunate Truth
Speed Up Your Code With Cython
6 Ways to SPEED UP Python Program! 🏎💨#codebasics #shorts #dataanalysis #data
How To Speed Up Pandas in Python By 150x
How to use Cython to speed up Python
Python vs C/C++ speed test | Counting to 1 billion | #shorts #python #cpp
Speeding Up Python Code With Caching
Garbage Collection in Python: Speed Up Your Code
Mypyc is the EASIEST way to speed up your Python code
Stefan Behnel - Cython to speed up your Python code
Make Your Pandas Code Lightning Fast
Комментарии