Unlocking Python's Cores: Hardware Usage and Energy Implications of Removing the GIL
Jos\'e Daniel Montoya Salazar

TL;DR
Disabling Python's GIL in an experimental build improves performance and reduces energy use for parallelizable workloads, but increases memory consumption and may worsen efficiency for sequential or lock-contention workloads.
Contribution
This study provides empirical measurements of energy, hardware utilization, and performance impacts of removing the GIL in Python 3.14.2 across various workload types.
Findings
Parallel workloads benefit from GIL removal with up to 4x faster execution.
Energy consumption correlates with execution time, not power draw, when GIL is disabled.
Memory usage increases due to thread-safety mechanisms and new memory allocators.
Abstract
Python's Global Interpreter Lock prevents execution on more than one CPU core at the same time, even when multiple threads are used. However, starting with Python 3.13 an experimental build allows disabling the GIL. While prior work has examined speedup implications of this disabling, the effects on energy consumption and hardware utilization have received less attention. This study measures execution time, CPU utilization, memory usage, and energy consumption using four workload categories: NumPy-based, sequential kernels, threaded numerical workloads, and threaded object workloads, comparing GIL and free-threaded builds of Python 3.14.2. The results highlight a trade-off. For parallelizable workloads operating on independent data, the free-threaded build reduces execution time by up to 4 times, with a proportional reduction in energy consumption, and effective multi-core…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Security and Verification in Computing · Computational Physics and Python Applications
