Empirical Performance Evaluation of Sequential, Multithreading, and Multiprocessing Models for Cpu-bound Workloads in Python
Year: 2025
Type: article
Abstract: The increasing demand for high-performance computing has made parallel processing a critical approach for optimizing computational workloads. Python, despite its popularity in scientific and general-purpose computing, faces architectural limitations due to the Global Interpreter Lock (GIL), which restricts true multithreaded execution in CPU-bound tasks. This study empirically evaluates the performance differences between sequential execution, multithreading, and multiprocessing in Python using controlled benchmarking experiments on an Apple M1 multicore architecture. CPU-bound numerical workloads ranging from 20 million to 120 million iterations were executed under each model, with execution time, speedup, and parallel efficiency measured across multiple repetitions. The results indicate that multithreading provides negligible performance improvement, achieving speedup values of approximately 1.05, confirming the limiting effect of the GIL. In contrast, multiprocessing achieved speedup values between 3.16 and 3.55 using four worker processes, with a maximum parallel efficiency of approximately 89%. These findings demonstrate that process-based parallelism significantly outperforms thread-based parallelism for CPU-intensive workloads in CPython. The study provides empirical validation of theoretical parallel computing models and offers practical guidance for performance optimization in Python-based computational systems. Keywords : Parallel computing, Multiprocessing, Multithreading, Python performance, CPU-bound workload, Speedup analysis
Institution: Universitas Nahdlatul Ulama Sumatera Utara
Language: English
Subfield: Hardware and Architecture
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W7220153263
