Is Python Really Green? Energy Consumption Study Reveals Surprising Rankings
A recent analysis comparing 27 programming languages shows that despite Python's popularity, it and Perl consume far more energy than languages like C, C++, and Rust, challenging common assumptions about performance and environmental impact.
Python is undeniably one of the world’s most popular programming languages, widely used in artificial intelligence, data analysis, web development, and more, even topping the latest TIOBE index.
However, a 2017 study by researchers at Universidade do Minho, supplemented by a newer study this year, indicates that Python and Perl are among the least energy‑efficient languages when executing specific tasks.
The 2017 research evaluated 27 languages and found that Python and Perl had the highest energy consumption rankings, with values exceeding 75 on a scale where C, the most efficient, is set to 1. C was followed by Rust, C++, and Ada.
Comparative charts illustrate the energy, time, and memory usage of various languages, highlighting Python’s poor performance in these metrics.
The study also disproves the common belief that faster programs always consume less energy, showing that other factors significantly influence total energy use.
In the updated 2023 tests, researchers added measurements of DRAM energy, peak memory, and total memory usage during execution, providing a more comprehensive view of each language’s environmental impact.
Additional benchmarks from Rosetta Code demonstrate that Python often ranks in the lower half of energy consumption tests and even failed to complete a Fibonacci calculation within a 24‑hour deadline.
Overall, the latest results confirm that Python and Perl consistently rank at the bottom in energy efficiency, while languages such as C, C++, and Rust emerge as the most environmentally friendly choices.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
