On the Energy Consumption of CPython

QUATIC, September 12, 2024

Helge Pfeiffer, Research Centre for Government IT,
IT University of Copenhagen

Motivation

Python is the most popular programming language

Motivation

Python is the most popular programming language

Motivation

Ever more production systems (web-applications/-services) are written in Python

Motivation

The Problem

Source: Pereira, R. et al. 
“Ranking programming languages by energy efficiency” (2021)

The Problem

Source: Georgiou, S. et al. “Analyzing programming languages’ energy consumption: An empirical study” (2017)

Experiment Design

Experiment Design

MiniTwit a Twitter-like micro-blogging application. Originally, Armin Ronacher’s example application for the Python web-framework Flask.

Experiment Design

Results

Results

Results

Impact for Practitioners

Impact for Researchers:

Relevant for future language improvements are questions like

I hope that this work inspires others to investigate such questions and thereby help to increase sustainability of the reference implementation of the currently most popular programming language.

Future Work

Thank you!

On the Energy Consumption of CPython
Helge Pfeiffer
ropf@itu.dk
Research Centre for Government IT
IT University of Copenhagen