Energy consumption of programming languages in machine learning: Comparing compiled and interpreted languages in the context of training machine learning models
2025 (English)Independent thesis Basic level (degree of Bachelor), 20 credits / 30 HE credits
Student thesis
Abstract [en]
As machine learning is seeing increased adoption, it is important to consider the sustainability of the technology. Training machine learning models can be resource-intensive, which may lead to high energy consumption. In order to achieve sustainable use, ways of reducing the energy consumption of machine learning is needed. In this study, a quasi-experiment was conducted to compare the energy consumption of the interpreted language Python, and the compiled language C++, in the context of training machine learning models. The energy consumption of both execution and compilation was measured, while also considering the impact of compiler optimization levels.The results showed that there were differences between interpreted and compiled languages in machine learning, however, the differences were smaller than found in previous research. There were also differences between compiler optimization levels, but some levels were more consistent than others. While certain patterns in energy consumption were seen, determining the most energy efficient programming language or optimization level was difficult. The study concluded that the energy consumption can be attributed to factors other than the programming language itself and varies between use-cases.
Place, publisher, year, edition, pages
2025. , p. 32
Keywords [en]
Machine learning, Programming languages, Compiled languages, Interpreted languages, Energy consumption
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:his:diva-25571OAI: oai:DiVA.org:his-25571DiVA, id: diva2:1985392
Subject / course
Informationsteknologi
Educational program
Computer Science - Specialization in Systems Development
Supervisors
Examiners
2025-07-242025-07-242025-09-29Bibliographically approved