Theory is good. Proof is better. 🐢 vs ⚡ We’ve all studied Multithreading in Python. We know the definitions. But have we actually performed the benchmark? I decided to put the theory to the test. wrote two scripts to download high-res images: 1️⃣ Single-Threaded: The standard loop we all write. 2️⃣ Multi-Threaded: Using ThreadPoolExecutor. That is a 60% performance increase just by changing how we handle I/O waiting time. Check out the video to see the race, and grab the code on my GitHub to try it yourself! 👇 https://lnkd.in/gZASrAUj #Python #RealWorldCoding #DataAnalysis #Multithreading #Performance
Great practical demonstration! 👏 Very insightful.
Multithreaded isn't suited for I/O bound tasks , you should check this again with time syscall in Unix and understand how your program is behaving in real time , user time and kernel time . Always asynchronous programming is better for I/O