An Empirical Study on the Performance and Energy Usage of Compiled Python Code
Vincenzo Stoico, Andrei Calin Dragomir, Patricia Lago

TL;DR
This study empirically compares the performance and energy efficiency of various Python compilers across multiple benchmarks, revealing significant improvements and variability depending on the compiler and code characteristics.
Contribution
It provides a comprehensive analysis of how different Python compilers affect performance and energy consumption, considering factors like code characteristics and hardware settings.
Findings
Codon, PyPy, and Numba achieve over 90% improvements in speed and energy efficiency.
Nuitka consistently optimizes memory usage across testbeds.
Compilation effects on LLC miss rate vary significantly across benchmarks.
Abstract
Python is a popular programming language known for its ease of learning and extensive libraries. However, concerns about performance and energy consumption have led to the development of compilers to enhance Python code efficiency. Despite the proven benefits of existing compilers on the efficiency of Python code, there is limited analysis comparing their performance and energy efficiency, particularly considering code characteristics and factors like CPU frequency and core count. Our study investigates how compilation impacts the performance and energy consumption of Python code, using seven benchmarks compiled with eight different tools: PyPy, Numba, Nuitka, Mypyc, Codon, Cython, Pyston-lite, and the experimental Python 3.13 version, compared to CPython. The benchmarks are single-threaded and executed on an NUC and a server, measuring energy usage, execution time, memory usage, and…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications
