Tagged articles
6 articles
Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2023 · Fundamentals

10 Practical Scenarios Using ThreadPoolExecutor and ProcessPoolExecutor in Python

This article presents ten practical Python examples that demonstrate how to use ThreadPoolExecutor and ProcessPoolExecutor for concurrent tasks such as executing functions, downloading files, compressing data, performing calculations, handling large datasets, lazy file reading, prime filtering, and computing Fibonacci numbers.

ThreadPoolconcurrent.futuresprocesspool
0 likes · 6 min read
10 Practical Scenarios Using ThreadPoolExecutor and ProcessPoolExecutor in Python
Python Programming Learning Circle
Python Programming Learning Circle
Mar 3, 2023 · Backend Development

Accelerating Image Pre‑processing in Python with a Three‑Line Multiprocessing Trick

This article demonstrates how to boost the speed of image‑preprocessing tasks in Python by replacing a conventional single‑process loop with a three‑line concurrent.futures ProcessPoolExecutor implementation, achieving up to six‑fold performance gains on multi‑core CPUs.

concurrent.futuresdata-preprocessingimage-processing
0 likes · 7 min read
Accelerating Image Pre‑processing in Python with a Three‑Line Multiprocessing Trick
MaGe Linux Operations
MaGe Linux Operations
Dec 27, 2020 · Fundamentals

Boost Image Preprocessing Speed in Python with Just 3 Lines of Code

Learn how to accelerate Python image preprocessing by leveraging the built‑in concurrent.futures module to run tasks across all CPU cores, turning a single‑core script that takes seconds into a multi‑core version that finishes in under two seconds with only three extra lines of code.

Performance Optimizationconcurrent.futuresimage preprocessing
0 likes · 7 min read
Boost Image Preprocessing Speed in Python with Just 3 Lines of Code